Sweets, dairy, spicy foods, and heavy late-night meals are the foods most consistently linked to nightmares. In a large study published in Frontiers in Psychology, participants who reported food-related dream changes blamed disturbing dreams primarily on desserts and sweets (31%), dairy products (22%), meat (16%), and spicy foods (13%). The connection isn’t just folklore: several physiological mechanisms explain why certain foods disrupt the sleep stages where nightmares happen.
Sweets and Sugary Foods
Desserts and sweets top the list, blamed for disturbing dream changes more than any other food category. They were also the food group most frequently blamed for worse sleep overall, at nearly 23% of responses. The likely mechanism involves blood sugar. Eating sugary foods before bed causes a rapid spike in blood glucose followed by a drop during the night. This nocturnal dip can trigger your body’s stress response, releasing hormones like adrenaline and cortisol that fragment sleep and push you into lighter, more dream-heavy stages. The Joslin Diabetes Center lists nightmares as one of the key signs that blood sugar has dropped too low overnight, alongside waking up sweaty or with a headache.
Dairy and Cheese
The idea that cheese gives you nightmares has a long cultural history, and it’s partially supported by evidence, though not quite in the way most people think. Dairy was the second most blamed food category for disturbing dreams at 22%. One informal study found that different British cheeses seemed to produce different types of unusual dreams: Stilton eaters reported bizarre dreams, Red Leicester fans dreamed about the past, and Lancashire cheese was associated with dreams about the future. None of the volunteers technically reported nightmares, but the dreams were notably strange.
The more likely explanation involves digestion. Cheese and other dairy products are high in fat and can cause indigestion when eaten late at night. That physical discomfort fragments sleep, and fragmented sleep means more awakenings during dreaming phases, which means you remember more of what your brain was doing. People with lactose intolerance face an even stronger effect. Research found that lactose intolerance independently predicted higher nightmare scores, and the relationship was mediated by gastrointestinal symptoms like bloating, cramping, and gas. In other words, the worse your gut feels overnight, the worse your dreams get.
Cheese also contains tryptophan, an amino acid the body converts to serotonin, which plays a role in regulating both mood and sleep cycles. Whether this contributes to vivid dreaming or actually promotes better sleep is still unclear.
Spicy Foods
Spicy meals were blamed for 13% of disturbing dream changes and nearly 20% of worse sleep reports. A controlled study found that when healthy young men ate meals containing Tabasco sauce and mustard at dinner, their sleep was markedly disrupted: they spent less time in deep sleep, more time awake, and took longer to fall asleep. The spicy meals also elevated body temperature during the first sleep cycle. Since your body needs to cool down to enter and maintain deep sleep, that temperature increase from capsaicin (the compound that makes peppers hot) works directly against your body’s sleep process. The result is lighter, more restless sleep with more frequent awakenings, the same pattern that produces nightmare recall.
High-Fat and Heavy Meals
Eating a fatty meal close to bedtime disrupts sleep architecture in measurable ways. Research in Advances in Nutrition found that nighttime fat intake was positively correlated with longer time to fall asleep, more wakefulness after initially falling asleep, and less time in REM sleep in both men and women. Higher saturated fat intake was specifically associated with less deep sleep. The body releases a satiety hormone after high-fat meals that increases fatigue but paradoxically makes sleep less restorative. Physical discomfort from slow digestion adds another layer: your stomach is working hard while your brain is trying to cycle through normal sleep stages, and the conflict leads to disrupted, dream-heavy sleep.
Alcohol
Alcohol isn’t a food, but it’s consumed alongside meals often enough to deserve mention. It has a distinctive two-phase effect on sleep. In the first half of the night, alcohol acts as a sedative, suppressing the dreaming stage of sleep and pushing you into deep sleep faster. In the second half, as your body metabolizes the alcohol, you experience what researchers call “REM rebound,” where the brain compensates for the earlier suppression by flooding you with intense dreaming. This is when nightmares typically strike. Sleep becomes fragmented, with increased wakefulness and lighter sleep stages. People who drink regularly and then stop often report vivid, disturbing dreams that persist well into abstinence.
Caffeine Late in the Day
Caffeine doesn’t directly cause nightmares, but it sets the stage for them. A study in the British Journal of Clinical Pharmacology found that caffeine reduced total sleep time by an average of two hours and increased the time to fall asleep to 66 minutes. It also decreased the ability to develop or sustain deeper stages of sleep. When you finally do sleep after too much caffeine, your brain spends more time in lighter stages where vivid dreaming and awakenings are more common. The combination of sleep deprivation and fragmented sleep is a well-established trigger for nightmares.
Vitamin B6 Supplements
If you take B-complex vitamins or a standalone B6 supplement before bed, your dreams may become noticeably more memorable. A randomized, double-blind study found that taking 240 mg of vitamin B6 before bed for five consecutive days significantly increased the amount of dream content participants recalled. The effect was specific to recall rather than making dreams more bizarre or vivid, but remembering more of your dreams means you’re more likely to remember the unpleasant ones too.
Food Sensitivities Make It Worse
Your individual biology matters as much as what you eat. Research found that food allergies and gluten intolerance were both independently associated with food-related dream disturbances. Lactose intolerance had the strongest connection to nightmare frequency, and the link was driven by gastrointestinal symptoms. Bloating, cramping, and excess gas during sleep directly worsened dream quality. The researchers described this as the “food distress hypothesis”: it’s not necessarily something magical about the food itself, but rather that the physical discomfort of your body reacting badly to a food you’re sensitive to infiltrates your sleep and makes dreams more disturbing.
This means two people can eat the same bedtime snack and have completely different experiences. If cheese or bread or ice cream consistently gives you strange dreams, it may be worth considering whether you have an undiagnosed sensitivity to that food.
Timing Matters More Than You Think
Regardless of what you eat, when you eat plays a major role. Nighttime food intake in the 30 to 60 minutes before bed was correlated with multiple sleep disruptions, while total daily intake was not. In practical terms, the same meal eaten at 7 p.m. and at 10:30 p.m. will have very different effects on your sleep. Research on metabolic health found that stopping food intake at least three hours before bed improved blood sugar control, blood pressure, and heart rhythms. Those same improvements in overnight blood sugar stability would reduce one of the key triggers for nightmares.
If you’re prone to bad dreams, the simplest intervention is finishing your last meal or snack at least three hours before you plan to sleep, and keeping that meal moderate in sugar, fat, and spice.

