As a rule fasting or not we use a lot less energy while asleep. It really is a rest time, and although we certainly don't just stop functioning, we rest probably most of our normal bodily functions while sleeping. While eating digestion certainly still continues and while fasting detox also continues, but the body otherwise gets to rest everything not needed for those processes. While fasting our bodies take the opportunity to clean and repair our flesh bones and organs as needed, releasing stored toxins that the 'digesting' body was unable to, and it takes the chance to repair parts of the body that need it also. But another primary 'task' of the fasting body is to give rest to an overworked body. We know the digestion system gets rest, many people also take the opportunity, and often the body demands!- physical rest on top of that. Sleeping is for resting! What continues on inside us while we are sleeping is only what is necessary to continue on, and what won't interfere with our sleep usually. Only occasionally will a detox crisis be so important as to keep us from the sleep we need.
So in general and from my experience I'd say we use less energy as a rule while fasting because we aren't digesting, and also because we can relax and sleep more soundly! :)