You start with the number of calories your body burns at rest (called basal metabolic rate). BMR varies depending on mass, height, and age (you can determine yours with this calculator), but on average, this has been found to be about 45 calories per hour.
"BMR is measured after 8 hours of sleep, in a fasted state, and in neutral temperature conditions, so that one is truly measuring how much energy is being used to simply rest," says Christopher Winter, MD, sleep researcher and owner of Charlotesville Neurology and Sleep Medicine.
During sleep, your body functions at about 95% of what it does at simple rest. So if you can find an average caloric expenditure for an individual at rest (e.g. 45 calories/hour), you can calculate nocturnal calories burned by this equation:
(hourly BMR or calories burned) x .95 (same as 95%) x hours slept
"So 45 x .95 x 8 = 342 during 8 hours of sleep. 45 x 8 = 360 calories burned during 8 hours of rest...5% more than when one is asleep," says Winter.
Your body burns the most calories during deep REM sleep, when your brain is most active because it requires the most oxygen to function. "We cycle through several sleep stages (light to deep and REM) about every 90 minutes and repeat this cycle several times during the night. And likewise, metabolic activity also cycles throughout the night. Our brains are just as active (or even more active) during REM sleep, as they are while we are awake," says Wells.
If you're truly looking to maximize the amount of calories you burn during sleep, turn the room temperature down: according to the American Academy of Sleep Medicine, you should aim to sleep in a room that is between 15 and 19 degrees celsius.
"Sleeping in a colder room forces the body to burn more calories to keep you warm," says Winter.
You should also be sure to get enough sleep, as sleep deprivation can negatively affect your overall metabolism. "The less sleep you get, the slower your body burns calories to preserve energy — which can lead to your metabolism slowing down," says Winter.
And this can lead you to start packing on the pounds: a 2012 study found that men who slept 5 or less hours a night were almost 4 times more likely to be obese. Sleep deprivation has also been found to mess with the hormones leptin and ghrelin, increasing feelings of hunger.
Bottom line: if you keep your bedroom cool and dark, and you get your recommended 7-9 hours of sleep per night, you'll be more likely to burn a few hundred calories while you sleep. But it's a fairly negligible amount, so don't throw out your gym membership just yet.