Lower-hanging fruit along the same lines is figuring out a way to harness energy created by exercise equipment (treadmills, ellipticals, etc). I've often thought how dumb it is that all that energy is just burned off as friction. Seems like this would be a lot less complex to implement.
However a quick back-of-the-envelope calculation would rapidly show that muscle energy is dwarfed by possible savings on ordinary energy uses. A human being on a treadmill can't generate much more than 100W of usable energy, burning 2000 Kcal/hour doing this.
I don't think gp is suggesting using people to generate electricity through exercise. Finding a way to harness energy released when lots of people are exercising anyway (i.e. at a gym) might generate an appreciable amount of energy, with no change in human behavior.
An ancient way of doing that was to have living quarters near or on top of cattle stables. That way, the body heat of your cows would heat your living quarters in winter.