Sleep well and stay slim.

That's the astonishing takeaway from a U.S. study looking at sleep, metabolism and eating habits of 16 men and women.

Researchers at the University of Colorado found that when subjects came up short on sleep, they experienced almost immediate weight gain.

As The New York Times reports, the healthy adults were effectively sealed off from the outside world, with every morsel of food strictly recorded and sleep schedules enforced.

The amount of oxygen they used and carbon dioxide they produced was also tracked during the two-week experiment.

Half the subjects were allowed nine hours of sleep during the first week, while the other half were accorded just five. Everyone could eat as much as they liked.

For the second week, the sleep allowances were reversed.

By the experiment's end, scientists found that staying up late resulted in a higher metabolism, causing the sleep-deprived group to burn an average of 111 additional calories per day.

But those extra burned calories were more than made up for by the fact that subjects were actually eating during those wakeful hours. By the end of the first week the sleep-deprived group had gained an average of two pounds each.

"Just getting less sleep, by itself, is not going to lead to weight gain," study lead Kenneth Wright of the university's Sleep and Chronobiology Laboratory said in press release. "But when people get insufficient sleep, it leads them to eat more than they actually need."

The study, published last week in The Proceedings of the National Academy of Sciences, found fast weight gain among the sleep-deprived regardless of gender.

In the abstract, researchers note, "Our findings suggest that increased food intake during insufficient sleep is a physiological adaptation to provide energy needed to sustain additional wakefulness; yet when food is easily accessible, intake surpasses that needed."

Wright suggested part of those extra pounds was a product of behavioral changes.

“We found that when people weren’t getting enough sleep they overate carbohydrates,” he said. “They ate more food, and when they ate food also changed. They ate a smaller breakfast and they ate a lot more after dinner.”

He added that part of the change was behavioral. Staying up late and skimping on sleep led to not only more eating, but a shift in the type of foods a person consumed.

Night owls managed to consume 6 per cent more calories. But when they were allowed more sleep, carbohydrates and fats yielded to healthier foods -- and once they started sleeping more, they began eating more healthfully, consuming fewer carbohydrates and fats.

The study adds to a growing body of evidence against lack of quality rest.

Not getting enough of it has been linked to memory loss in seniors and increased anxiety.

According to a recent British study, even our genes are not immune.

Researchers at the University of Surrey in England recorded activity at the genetic level among people who aren't getting enough sleep.

"It used to be thought that sleep was by the brain, of the brain, for the brain," Harvard Medical School researcher Dr. Charles Czeisler told the LA Times earlier this month. "Now it's recognized that it plays an important role in bodily functions."

Related on HuffPost:

Loading Slideshow...
  • You're Ravenous

    If you find yourself hungry all day (and not because you skipped breakfast or have recently amped up your gym routine) it might be because you've been skimping on sleep. Research presented at the 2010 meeting of the Society for the Study of Ingestive Behavior linked little shuteye with <a href="">higher levels of the hormone ghrelin</a>, the same one that triggers hunger, HuffPost reported. This uptick in the hunger hormone seems to lead to not only increased snacking, but also a hankering for <a href="">high-carb, high-calorie foods</a>, according to a 2004 study, which may help explain why people who don't get enough sleep are at a greater risk of obesity.

  • You're Weepy

    Ever find yourself tearing up over an embarrassing TV commercial? While women might be quick to blame PMS, it could be a lack of sleep sending your emotions into overdrive. A 2007 study found that sleep-deprived brains were <a href="">60 percent more reactive</a> to negative and disturbing images, <em>USA Today</em> reported. "It's almost as though, without sleep, the brain had reverted back to more primitive patterns of activity, in that it was <a href="">unable to put emotional experiences into context</a> and produce controlled, appropriate responses," Matthew Walker, senior author of the study, said in a statement.

  • You're Forgetful Or Unfocused

    You might be tempted to blame your trouble focusing on your age or stress or your overflowing email inbox, but a lack of sleep could be the true culprit. Too few hours in dreamland has been linked to a <a href="">whole host of cognitive problems</a>, like difficulty focusing and paying attention, confusion, lower alertness and concentration, forgetfulness and trouble learning, WebMD reports. So next time you find yourself forgetting where you put your keys, consider how much sleep you got last night.

  • You Can't Shake That Cold

    If you keep coming down with the sniffles -- or can't seem to kick that never-ending case -- you might want to assess your sleep schedule. A 2009 study found that people who sleep fewer than seven hours each night have almost <a href="">three times the risk of catching a cold</a> than people who slept for at least eight hours, the <em>LA Times</em> reported.

  • You're Clumsier Than Usual

    First you knock the alarm clock off the dresser, then you spill the milk as you're pouring your cereal, then you stub your toe on the way out the door -- you've become a klutz overnight. Researchers don't know exactly why, but sleepy people seem to <a href="">"have slower and less precise motor skills,"</a> Clete Kushida, M.D., Ph.D., director of Stanford University Center for Human Sleep Research told <em>Prevention</em>. Reflexes are dulled, balance and depth perception can be a little wonky and since you may also have trouble focusing, reaction time can be slowed, meaning you can't quite catch the egg carton before it hits the floor.

  • You've Lost That Lovin' Feeling

    If you or your partner just can't get in the mood, and stress or an underlying health problem isn't to blame, you might want to spend some extra time between the sheets -- sleeping. Both men and women who don't get their 40 winks experience a <a href="">decreased sex drive</a> and less interest in doing the deed, WebMD reports. A lack of sleep can also <a href="">elevate levels of cortisol</a>, the stress hormone, according to Everyday Health, which doesn't help in the bedroom either.