The modern body converts the energy gained by consuming food into a substance known as ATP which contain high energy phoshorus bonds. The process of producing ATP occurs in the mitocondria which are in essence small energy factories located in every cell.
When splicing one or two of these bonds and thus converting ATP into ADP or AMP a lot of energy is produced. This process occurs whenever and wherever energy is needed, for instance muscle activity, creating enzymes and all those other things the body does to keep itself going. This process of creating ATP out of food and then when needed converting it into energy is very efficient.
Deliberately though, the body doesn't create as many ATP as it could for the very reason that we need to keep the bodytemperature of 37C (98,6F). The inherent production of heat is thus not a flaw, instead it's a processs necessary for the body to keep the overall efficiency at it's maximum. (Most enzymes are optimized to work at 37C).
This is why for instance all mammals need a constant supply of energy as opposed to reptiles who don't heat their bodies through internal heat production. (Need to eat or use the prevalent fatty layer)
It is as explanied above for obvious reasons a waste of energy to use living organisms as energyproducers like in the film "Matrix".
One could though lower the amount of heating required if there are many ppl living in the same room since the body heat produced aids in keeping the room warm.
/Matt, MD