Getty Images The sight of junk food activates the pleasure-seeking parts of sleep-deprived brains.

Next time you order a pepperoni pizza late at night don’t blame your stomach. Blame your sleep-deprived brain.

Junk food is more appealing to people who are sleep-deprived because sleepy brains associate junk food with reward and pleasure, said researchers at the annual Associated Professional Sleep Societies meeting. The sight of junk food, however, does not activate the reward centers of well-rested brains in the same way.

In other words, when you’re sleepy you’re more likely to succumb to eating unhealthy food.

For the study, Marie-Pierre St-Onge and her colleagues at St. Luke’s-Roosevelt Hospital Center and Columbia University in New York performed functional magnetic resonance imaging (fMRI) scans on 25 men and women of normal weight, in order to track blood flow to the brain while they looked at images of healthy and unhealthy foods.

The researchers scanned the brains of the volunteers under two different conditions: after five nights of sleep for nine hours and after five nights of limited sleep for four hours. Scan results showed that images of junk food, such as candy and donuts, activated areas of the brain considered reward centers only in sleep-deprived people.

(MORE: Disney’s Diet: No More Junk Food Ads on Kids Channels)

“The results suggest that, under restricted sleep, individuals will find unhealthy foods highly salient and rewarding, which may lead to greater consumption of those foods,” said St-Onge, the head researcher.

Sleep-deprived individuals are drawn to junk food because “when you are fatigued, your body would want calorie-dense foods that give you quick energy,” explained Samantha Heller, registered dietician and clinical nutrition coordinator at the Center for Cancer Care at Griffin Hospital, to HealthDay. It’s best to keep healthy food options around, rather than rely on junk food for temporary bursts of energy, she added.

Meanwhile, St-Onge, the study’s main author, said there’s a clear take-home message: get plenty of sleep — at least seven to eight hours — every night.

LIST: Top 10 Iconic Junk Foods