Tired? Surely those cookies will help. And a burger. Chips. And a cupcake. Yeah, soda, too.

People do eat more when they're short of sleep. And that impulse to snarf when sleepy can cause quick weight gain, according to a new study.

Since Americans are chronically sleep deprived, it's no wonder that our waistlines have been expanding. One-third of American workers say they're sleeping six or fewer hours a night, compared with the seven to nine hours recommended.

In the experiment, people who were allowed to sleep just five hours a night ate more than when they got nine hours of shuteye. In five days of shortened sleep, they gained almost 2 pounds.

Any office worker standing morosely in front of the office vending machine can tell you that they eat more when tired. To find out why, the researchers at the University of Colorado measured people's energy expenditure and food intake in a tightly controlled experiment.

They locked their 16 test subjects, one by one, in a calorimeter room, which measures every bit of energy that a person burns. When the subjects were allowed to sleep just five hours a night, they burned more energy than when they were allowed to sleep for nine hours a night.

"The amount of energy they burned was equivalent to doing water aerobics for 25 minutes," says Kenneth Wright, a physiology researcher at the University of Colorado and a co-author of the study, which was published in the Proceedings of the National Academy of Sciences.

Burning more calories sure sounds like an upside to sleep deprivation. But here's the downside: Those sleepy subjects also showed less self-control when presented with three abundant meals and snacks daily.

When well-rested, the women had "more food restraint," Wright says. The men proved less strong-willed. They chowed down, gaining weight even when getting plenty of sleep.

When sleep deprived, the women lost that restraint. Both men and women ate more. They did that while ignoring signals from hormones that typically tell the brain that the stomach is full.

But wait, there's more bad news! While in the tired phase, the participants skipped breakfast and ate a lot more at night, especially carbs and fats. Of late, more and more evidence has accumulated that eating late in the day makes weight gain more likely.

Other studies have found that lack of sleep affects the body's response to insulin, increasing the risk of developing diabetes.

So the next time you feel drawn inexorably toward the vending machine, tell yourself: You're not weak, just tired.