I have thought a lot about the heat generation thing, and of course the 'retention of heat' theory at first seems to be the explanation, but it fails under several circumstances.
First of all, when doing alternate nostril pranayama exercises, one can go from cool or cold to profusely sweating in a matter of seconds. During these breathing exercises, heat is still lost in the act of breathing, although the rate of breathing is slower than normal. Further, when doing these breathing exercises, my experience is that all the heat is generated on the exhale, which is when the vagus nerve is stimulated and the heart slows down.
I have read some explanations in yoga books about this heat.
During static apneas, the heat is generally only felt near the end, when the urge to breathe is the greatest. Often the heat comes quite suddenly. During the end of the breath hold, the vagus nerve is stimulated much more than in the early stage of the breath-hold.
The vagus nerve is not used to carrying a strong electrical current. It is very rarely stimulated to the level achieved during apnea or pranayama. The vagus, in turn, controls many other nerve networks.
My theory is that when the vagus nerve is stimulated with a higher than usual electrical current, heat is created via electrical resistance. P=[I^2]R, so the heat will increase with the square of the current.
It is also well known that once a yogi reaches a certain level, pranayama and/or long breath-holds will no longer produce heat. This is the same thing that happened to me when I was practicing intense bhastrika. At first, I would get extremely hot during the practice. As the months passed, I wouldn't get hot at all. After stopping the practice for some months, I would get hot again upon trying it.
One could theorize that after extensive, long term stimulation of the vagus nerve, the electrical resistance of the vagus nerve (and sub channels) would decrease (perhaps akin to the 'opening of the nadis' as the yogis call it). Then, the heat generated would decrease or be eliminated.
So, I think the heat generated in apnea or pranayama is partly due to lack of heat loss from lack of breathing, and partly due to electrical heat in the vagus network.
Eric Fattah
BC, Canada