It can sometimes be difficult to resist buying tasty candy and snacks while doing the weekly grocery shopping. But according to new research, a bad night’s sleep could make the temptation even harder and lead to increased food purchasing.

The study, published in the journal Obesity, analyzed whether sleep deprivation would impair or alter an individual’s shopping habits, based on the hypothesis that sleep deprivation can decrease higher-level thinking and increase hunger.

“We chose total sleep deprivation (TSD) to investigate the influence of sleep loss on food purchasing behavior in humans,” say the study authors. “Our findings are broadly significant for people working in a variety of professions, including shift workers, cab drivers, nurses, doctors, and other jobs requiring work at night.”

The researchers recruited 14 men of normal, healthy weight for their research. At the baseline of the study, all participants enrolled were confirmed to have normal sleep-wake rhythms.

The subjects were asked to have one full night of normal sleep and one night of total sleep deprivation (TSD).

On the morning after both occasions, the men were given a fixed budget of $50 to buy food from a supermarket.

The subjects were instructed to purchase as much as possible from a list of 40 food items. This consisted of 20 high-calorie foods and 20 low-calorie foods. Before the task, all men were given a standardized breakfast to limit the effect of hunger on their food purchases.

Findings showed that when the men were sleep deprived, they purchased 9% more calories and 18% more food, compared with their purchases after a good night’s sleep.

The men’s blood levels were also measured, both after one good night’s sleep and one night of sleep deprivation. The results revealed that after sleep deprivation, concentrations of the hormone, ghrelin – a hormone that increases hunger – were significantly higher. The researchers add, however, that this did not correlate with food purchasing behavior.

Colin Chapman, first author of the study from Uppsala University in Sweden, says:

“We hypothesized that sleep deprivation’s impact on hunger and decision making would make for the ‘perfect storm’ with regard to shopping and food purchasing, leaving individuals hungrier and less capable of employing self-control and higher-level decision-making processes to avoid making impulsive, calorie-driven purchases.”

Our finding provides a strong rationale for suggesting that patients with concerns regarding caloric intake and weight gain maintain a healthy, normal sleep schedule.”

The researchers say that follow-up studies are needed to address whether these findings are more prominent within obese populations and in those with chronic sleep disorders.

“Additionally,” say the study authors, “studies should investigate whether or not this impact on purchasing behavior extends to other items beyond food, including high-price items, where purchasers could fall victim to disrupted decision making.”

Last year, a study from the University of California suggested that a bad night’s sleep can lead to unhealthy food choices by impairing activity in the frontal lobe of the brain – an area vital for making good food choices.