Evidence has suggested for some time that sleep deprivation can lead to obesity, among a host of other ills. Now researchers are digging into the mechanisms that cause our sleep-deprived brains to crave food they do not need.

A study published on Tuesday in the journal SLEEP suggested that the brain receptors that can lead the sleep-deprived to crave unnecessary food were the same as those activated by marijuana. Essentially, not sleeping can give you a ferocious case of the munchies.

The study took a close look at receptors affected by endocannabinoids — so named for cannabis, the marijuana plant — which it found were closely involved in the food cravings that come from sleep deprivation. Sleep restriction in the study’s subjects led to amplified endocannabinoid levels in the blood, leading to hunger pangs, which generally intensify in the early afternoon, to increase further.

Fourteen healthy, non-obese subjects between the ages of 18 and 30 participated in the study. All of the subjects participated in both aspects of the study, undergoing four nights of either healthy sleep or sleep deprivation, after which they were given two regular meals as well as unlimited access to “palatable snacks,” including candy, chips with guacamole and salsa, Doritos, Cheetos and ice cream, as well as healthier options such as fruit and yogurt.