Going to bed late could lead to weight gain, even in people who are otherwise healthy, according to a new study. Researchers say that people tend to snack on unhealthy food late at night that leads to weight-gain.

The study was conducted at the Sleep and Chronobiology Laboratory at the hospital of the University of Pennsylvania and included 225 healthy, non-obese individuals, between ages 22 and 50 years. Researchers found that people who slept for only 4 hours from 4 a.m. to 8 a.m. gained more weight when compared to people who had ten hours of uninterrupted sleep from 10 pm to 8 am.

Previously, a study published in the American Journal of Clinical Nutrition had found that shorter duration of sleep makes people eat more, especially food that is high in fat. When people do not get enough exercise to use this extra food, they tend to store it in their bodies. The new research is unique because it was conducted in controlled laboratory settings.

"Although previous epidemiological studies have suggested an association between short sleep duration and weight gain/obesity, we were surprised to observe significant weight gain during an in-laboratory study," said lead author Andrea Spaeth, a doctoral candidate in the psychology department at the University of Pennsylvania in Philadelphia, Pa.

All the participants in the study were given access to all kinds of food. They were allowed to watch TV, play video games or exercise. In all, researchers just controlled the amount of sleep that they got each night.

The study also showed that males and African-Americans, who were sleep-restricted tended to put on more weight than females or Caucasians.

"Among sleep-restricted subjects, there were also significant gender and race differences in weight gain," said Spaeth in a news release. "African Americans, who are at greater risk for obesity and more likely to be habitual short sleepers, may be more susceptible to weight gain in response to sleep restriction. Future studies should focus on identifying the behavioral and physiological mechanisms underlying this increased vulnerability."

Over a quarter of all people living in the U.S. reported having insufficient sleep, according to data from Centers for Disease Control and Prevention. Lack of a good sleep has been associated with a number of other chronic conditions like stroke and cancer. A study from the journal Obesity, says that short sleep duration was independently associated with weight gain among all age groups.  Another study had found that even a week of inadequate sleep could lead to changes in activity of hundreds of human genes.

The present study is published in the journal Sleep.