Scientists have long been interested in what happens to our metabolism and energy stores when we're sleeping. Now, some researchers have measured the amount of energy we save by sleeping.

It turns out, by staying awake all night, we burn about 135 more calories than we do when we're sleeping, according to the study conducted by researchers at the University of Colorado at Boulder.

That number is higher than scientists expected it to be, and the researchers say it shows that sleep conserves the energy the brain needs to do its work while we're getting shut-eye.

Because the study participants were required to lie down in bed just as if they were sleeping, though they couldn't actually go to sleep, the findings also give scientists a better understanding of how our energy levels vary when we sleep and with our daily circadian rhythms.

"We're all starting to agree, more and more, that there are multiple functions of sleep," many of which require energy, said study researcher Kenneth Wright, a physiology professor at the University of Colorado at Boulder. "The study provides us a number, to see, how much energy sleep itself saves under normal conditions in healthy people."

The findings are published in the January issue of the Journal of Physiology.

What happens when we sleep?

Researchers suspected that the body's energy use dropped at night, Wright said. But they didn't know how much of the decrease was due to sleep itself, and how much was due to a normal, nighttime drop in metabolism brought about by the biological clock. Even when you're not sleeping at night , you're still burning fewer calories than you do during daytime hours, he explained.

To solve the mystery, Wright and his colleagues studied seven people, whose average age was 22. Each participant lived for three days in a special room that allowed the researchers to measure precisely how many calories his or her body was using.

The first night, the participants were allowed to sleep as they normally would. Then, the researchers deprived the participants of sleep for 40 hours the equivalent of missing one night of sleep and not being able to nap during the next day. The study participants were required to stay in bed during the night.

The participants burned on average 135 more calories during their sleepless night than they did when they were allowed to sleep normally, with some burning as many as 160 more calories. Researchers had previously hypothesized that the number would be closer to 100 calories, Wright said.

These 135 calories that are saved during a night's sleep are likely needed for other functions. The brain is hard at work while we sleep, Wright said.

"The brain makes connections of things we learned during the day, so we have stronger memories the next day," Wright said. And the body releases hormones such as growth hormone and restores the immune system which also requires energy.

Previous studies had measured how many calories people burn when they stay up all night, but in those studies, the participants were moving around or doing other activities that use energy.

The results don't apply to most of the all-nighters that people pull, Wright said.

"For most of us, if we're up all night, we're doing something," he said.

But they do give researchers clues to how sleep affects the way our bodies use calories.

So can sleep deprivation make you thinner?

People shouldn't take the findings to mean that staying up all night is a good way to burn extra calories to lose weight , Wright said.

But the study proves there is a direct correlation between the sleepwake cycle and how the body uses energy, the researchers said. And in fact, over the long term, it's believed that getting too little sleep contributes to weight gain, Wright said.

"Sleep loss contributes to obesity," Wright told MyHealthNewsDaily, and researchers should further explore the question of how chronic sleep loss affects body weight, he said.

"The common condition in our society," he said, "is that people chronically get too little sleep during the workweek," and studies have shown this contributes to weight gain.

"Now," he said, "we need to understand how."

Pass it on: By staying up all night, you burn an extra 135 calories. But long term sleep loss leads to weight gain, and researchers aren't sure why.

Follow MyHealthNewsDaily Managing Editor Karen Rowan @karenjrowan.