This Dr. Axe content is medically reviewed or fact checked to ensure factually accurate information.
With strict editorial sourcing guidelines, we only link to academic research institutions, reputable media sites and, when research is available, medically peer-reviewed studies. Note that the numbers in parentheses (1, 2, etc.) are clickable links to these studies.
The information in our articles is NOT intended to replace a one-on-one relationship with a qualified health care professional and is not intended as medical advice.
This article is based on scientific evidence, written by experts and fact checked by our trained editorial staff. Note that the numbers in parentheses (1, 2, etc.) are clickable links to medically peer-reviewed studies.
Our team includes licensed nutritionists and dietitians, certified health education specialists, as well as certified strength and conditioning specialists, personal trainers and corrective exercise specialists. Our team aims to be not only thorough with its research, but also objective and unbiased.
The information in our articles is NOT intended to replace a one-on-one relationship with a qualified health care professional and is not intended as medical advice.
How Food Affects Sleep: Can Cheese Give You Nightmares?
August 29, 2025
You’ve probably heard the old wives’ tale that late-night cheese causes nightmares. For decades, people have joked about cheese-induced nightmares or late-night pizza leading to restless sleep. Turns out, there’s more to it than folklore.
A fresh, large-scale study published in Frontiers in Psychology now shines scientific light on how what you eat, especially dairy and sweets, can impact the quality of your sleep, dream vividness and even the likelihood of nightmares.
This study takes one of the most comprehensive looks yet at how diet influences sleep and dreaming. The findings reveal that foods like dairy, spicy dishes and desserts may truly interfere with sleep quality and increase the likelihood of vivid or unsettling dreams.
So how exactly does food affect sleep, and more importantly, what can you do to support healthier rest?
Study: How food affects sleep
Researchers led by Dr. Tore Nielsen surveyed 1,082 undergraduates using a comprehensive online questionnaire exploring diet, food sensitivities (like lactose or gluten intolerance), eating habits (especially late-night snacking), sleep quality, dream recall and nightmare frequency.
Participants completed an extensive online questionnaire that captured details about:
- Frequency of consuming different food categories (dairy, sweets, spicy foods, fruits, vegetables, herbal teas, etc.)
- Timing of meals and snacks (especially late-night eating)
- Presence of food sensitivities (including lactose intolerance, gluten intolerance and food allergies)
- Sleep quality (restfulness, nighttime disturbances, ease of falling asleep)
- Dream experiences (frequency, intensity, vividness and presence of nightmares)
Key results included:
- 40.2 percent reported that certain foods either worsened (24.7 percent) or improved (20.1 percent) their sleep.
- Foods most commonly linked to worse sleep were desserts/sweets (22.7 percent), spicy foods (19.5 percent) and dairy (15.7 percent). Meanwhile, fruits, herbal teas and vegetables were often associated with improved sleep.
- Only 5.5 percent experienced significant effects on their dreaming, labeled “food-dependent dreaming.” Among those, dreams became more vivid (around 55 percent), bizarre (60 percent) and disturbing (57 percent). These were most frequently blamed on desserts/sweets (30 percent) and dairy (21 percent).
Food sensitivities played a role too:
- Those reporting sleep disturbances tied to food were more likely to be lactose intolerant, with such individuals also rating their overall sleep quality lower.
- Dream changes were more likely among people with food allergies or gluten intolerance, though lactose intolerance wasn’t directly tied to dream effects.
All in all, the researchers found support for multiple pathways: food-specific effects (i.e., certain foods directly influencing dreams), food distress (gastrointestinal discomfort) and sleep effects (diet affecting sleep quality), especially via lactose intolerance and gastrointestinal symptoms triggering nightmares.
This large sample allowed researchers to tease out multiple patterns. Here are more details on the study and key results:
Key results
- Diet’s influence on sleep: As mentioned, 40.2 percent of participants reported that food noticeably affected their sleep, either making it worse (24.7 percent) or better (20.1 percent).
- Culprits for poor sleep: Sweets, spicy foods and dairy were the top categories linked with disrupted sleep.
- Foods linked to better rest: Herbal teas, fruits and vegetables were frequently cited as improving sleep quality.
- Impact on dreams: About 5.5 percent of participants experienced “food-dependent dreaming,” meaning their food choices clearly influenced dream content. Among these, dreams became:
- More vivid (55 percent)
- More bizarre (60 percent)
- More disturbing or nightmarish (57 percent)
- The most common culprits here were sweets and dairy.
Role of food sensitivities
- Lactose intolerance: Participants who reported poor sleep related to food were significantly more likely to be lactose intolerant. These individuals also tended to rate their sleep as less restful overall.
- Gluten intolerance and food allergies: Linked more closely to dream disturbances, including heightened vividness and more unusual dream content. Interestingly, lactose intolerance did not appear to affect dreams directly, but rather influenced general sleep quality.
Mechanisms proposed
The researchers outlined three possible pathways explaining why food can affect sleep and dreams:
- Food-specific effects: Certain foods may directly influence neurotransmitters and brain chemistry that regulate sleep and dreaming (e.g., sugar spiking blood glucose, dairy affecting serotonin pathways).
- Food distress effects: Gastrointestinal (GI) discomfort from problematic foods (such as dairy in lactose-intolerant individuals) can fragment sleep and trigger more unpleasant or restless dreams.
- Sleep effects: Poorer sleep quality from dietary choices may increase awakenings during REM sleep, when dreams are most vivid and easily recalled, leading to a stronger sense of having had intense or disturbing dreams.
What it means
These findings suggest that the relationship between diet and sleep isn’t just an old wives’ tale. Dairy, sweets and spicy foods can genuinely disrupt sleep and intensify dreams, particularly in those with relevant food sensitivities.
Lactose intolerance, for example, may cause GI distress that fragments sleep and amplifies dream negativity.
Conversely, consuming fruits, vegetables and herbal teas may promote calmer, more restful sleep.
It’s important to note, however, that the study is observational and relies on self-reported data. The direction of causality isn’t clear. Perhaps poor sleep leads to altered eating habits, or vice versa.
Still, this research highlights that diet isn’t just about physical health; it may play a powerful role in shaping the psychological landscape of our nights.
The findings suggest:
- Dairy and sweets can be “dream disruptors.” For some, these foods may lead to more vivid, strange or negative dreams.
- Spicy foods can disturb sleep. Heat-inducing compounds may raise body temperature or cause indigestion, interfering with restorative rest.
- Food sensitivities amplify risks. Those with lactose or gluten intolerance are especially prone to poor sleep and disturbed dreaming.
- Plant-rich foods may calm the system. Fruits, vegetables and herbal teas consistently ranked as supportive for restful sleep and gentler dream experiences.
That said, it’s again important to note that this was an observational, self-reported study, which means it cannot prove causality. Still, the consistent associations give strong clues that food, and especially intolerances, may influence how restful your sleep feels and how your dreams unfold.
How to support healthy sleep
The good news? By being mindful of diet and lifestyle choices, you can greatly improve your chances of restful, nightmare-free sleep.
Here are strategies supported by the study and broader sleep research:
1. Listen to your body
If dairy or sweets leave you bloated, crampy or restless, consider reducing them, especially before bedtime.
2. Cut late-night snacking
Eating close to bedtime, especially without hunger cues, is associated with poor sleep quality. The study found that eating when not hungry, especially close to bedtime, was linked to more disturbing dreams as well.
Aim to finish your last meal at least two to three hours before bed.
3. Prioritize soothing, nutrient-rich picks
Swap dessert or cheese for a cup of herbal tea, a piece of fruit or fresh vegetables in the evening.
- Herbal teas (like chamomile, valerian or lemon balm) have calming effects that may ease the transition into sleep.
- Magnesium-rich foods (such as leafy greens, almonds, pumpkin seeds) help relax muscles and support healthy melatonin production.
- Tryptophan-containing foods (like turkey, oats and pumpkin seeds) may support serotonin pathways linked to sleep quality.
4. Identify your food triggers
Keep a sleep journal, tracking what you eat in the hours before bedtime, and note dream intensity, vividness and how refreshed you feel in the morning. Patterns often reveal themselves within a few weeks.
5. Address food sensitivities
If you suspect lactose or gluten intolerance, medical testing, elimination diets or the use of digestive support supplements (like lactase enzymes) can clarify causes and help ease nighttime disruptions.
6. Promote overall gut comfort
Since GI distress is tied to poor sleep and disturbing dreams, focus on digestive health:
- Eat a fiber-rich diet with vegetables, fruits and whole foods.
- Consider probiotic foods like yogurt, kefir, kimchi or sauerkraut (unless dairy-sensitive).
- Stay well-hydrated, but avoid excessive fluids right before bedtime.
7. Limit common sleep disruptors
- Dairy: If you notice bloating, gas or poor sleep after eating cheese or ice cream, consider reducing intake or trying lactose-free options.
- Sweets and refined carbs: These can spike and crash blood sugar, fragmenting sleep. Swap desserts for a piece of fruit if craving something sweet.
- Spicy foods: Save chili or hot curries for lunchtime instead of dinner.
8. Establish sleep hygiene rituals
Diet is only part of the picture. Healthy sleep habits also matter, including sleep hygiene practices such as:
- Keep a consistent sleep-wake schedule.
- Create a cool, dark and quiet bedroom environment.
- Avoid excess caffeine, alcohol and blue light exposure before bed.
Conclusion
This new study lends credible scientific backing to the long-held belief that what you eat (and when) can meaningfully impact your sleep and dreams. It provides the strongest evidence to date that what we eat, especially dairy, sweets and spicy foods, can influence both the quality of our sleep and the tone of our dreams.
For individuals with food sensitivities like lactose or gluten intolerance, the effects can be even more pronounced.
For many, especially those with lactose intolerance or other sensitivities, reducing dairy or sweets in the evening could mean fewer nightmares and a more restful night. Swap in calming, nutrient-dense options like herbal teas, fruits and veggies, and you may just sleep better and dream sweeter.
By shifting evening eating habits (favoring herbal teas, fruits, vegetables, natural sleep aids and gut-friendly foods), you can create the conditions for deeper, more restorative sleep and fewer disturbing dreams.
Sleep well, dream well and fuel your nights wisely.

