“A fried egg and cheese with bacon please.” This was the breakfast I craved at 5:30 am when I was an intern after an all night shift in the hospital. What I didn’t realize at the time was how not getting enough sleep influenced what I ate.

There is increasing evidence that not getting enough rest negatively impacts eating habits and leads to excessive food intake.

After a bad night’s sleep, the hormone controlling appetite is affected, emotional stress is greater, more food is desired to compensate for lack of energy and impulsivity is increased, all of which affect the amount of food that you would consume in a day.

As anyone who has ever stayed up all night for work or other reasons knows well, we crave greasy food. According to research, there is a reason pizza and doughnuts are so much more appealing than avocado on whole grain toast after a late night. The lack of sleep increases the brain’s response to unhealthy food:

High-calorie foods become significantly more desirable when participants are sleep-deprived. This combination of altered brain-activity and decision-making may help explain why people who sleep less also tend to be overweight or obese.

The paradox is that consuming unhealthy food after a late night exacerbates exhaustion and actually makes us feel worse. These “comfort foods” turn out not to be not so comforting after all. In fact studies show that eating comfort food to help us feel better is a myth.

Keep this in mind next time you pull an all-nighter. The fried egg and cheese may sound appealing but you will have a much better and productive day if you have oatmeal (without the extra brown sugar) instead.