If you're not getting enough sleep, you may be more likely to get the "munchies."

Researchers at the University of Chicago found that a chemical reaction in the brain may be responsible for keeping some of us up at night and even making us crave more junk food. In fact, the study showed that, in some instances, sleep deprivation even has similar effects to using marijuana.

"We found that sleep restriction boosts a signal that may increase the hedonic aspect of food intake, the pleasure and satisfaction gained from eating," Erin Hanlon, Ph.D., a research associate in endocrinology, diabetes and metabolism at the University of Chicago, said. "Sleep restriction seems to augment the endocannabinoid system, the same system targeted by the active ingredient of marijuana, to enhance the desire for food intake."

The study involved 14 healthy men and women who were required to sleep in a lab for two, four-night visits. For one set of nights, the participants slept about eight hours. However, for the next set, their sleep was restricted to just a little more than four hours. On each of the days, they were also given identical meals at 9 a.m., 2 p.m. and 7 p.m.

When participants were sleep deprived, findings showed that they had higher levels of a chemical signal called endocannabinoid 2-arachidonoylglycerol (2-AG) in their blood, which makes people want to eat more. Blood levels of 2-AG are typically low overnight, but slowly rise during the day, peaking in the afternoon. Findings showed that less sleep elevates 2-AG blood levels throughout the day, increasing cravings.

Though the study had some limitations, including a rather small sample size, short duration and limited sampling frequency, the findings touch on significant implications regarding increased risk of obesity and lack of sleep.

Previous research has linked the two, including statistics from the Centers for Disease Control and Prevention (CDC), which suggest that close to a third of Americans get less than seven hours of sleep a night and more than a third of adults in the United States are obese. A 2013 Gallup poll also found that U.S. adults sleep an average of 6.8 hours per night and about 40 percent of adults even report sleeping six hours a night or less.

The study was published Monday in the journal Sleep.