Can cheese give you nightmares? How food affects your sleep

I’ve heard this one my whole life. “Don’t eat cheese before bed — it’ll give you nightmares.” It sounds like something your grandmother said. But there’s actually some science behind it. Not the nightmares specifically — but the way certain foods affect your sleep quality.

Let me break down what’s really happening when you eat before bed.


The cheese-nightsmare myth (and what’s actually true)

The British Cheese Board did a study in 2005 where participants ate different cheeses before bed. Surprisingly, none reported nightmares. But some did report vivid dreams. Cheese didn’t cause nightmares — but it did make dreams more vivid and memorable.

So what’s going on?

The mechanism: Cheese contains tyramine — an amino acid that stimulates the release of norepinephrine. This neurotransmitter activates your brain and can increase brain activity during sleep. More brain activity = more vivid dreams. Not nightmares necessarily — but more intense dream experiences.

The real issue: It’s not just cheese. Tyramine is found in many aged and fermented foods:

  • Aged cheese (cheddar, parmesan, blue cheese)
  • Cured meats (salami, prosciutto)
  • Fermented foods (sauerkraut, kimchi)
  • Soy sauce
  • Wine and beer
  • Smoked fish

If you eat these foods within 2-3 hours of bed, your brain has more fuel for activity during sleep. That’s why you might remember more dreams — or have more intense ones.


What actually disrupts your sleep (not just dreams)

The cheese myth is a distraction from the bigger issue: certain foods genuinely harm your sleep quality. Here’s what the research shows:

High-fat foods: A study in Nutrition Research found that higher fat intake — especially saturated fat — was associated with lighter, more fragmented sleep and more nighttime awakenings [1]. Your body has to work harder to digest fat. That digestive activity keeps you in lighter sleep stages.

Spicy foods: Capsaicin raises your core body temperature. Sleep requires your body temperature to drop. Eating spicy food 1-2 hours before bed can delay sleep onset and reduce sleep quality.

Large meals: Eating a big meal within 2-3 hours of bed forces your digestive system to work overtime. This activates your sympathetic nervous system — the “fight or flight” side. Sleep requires the parasympathetic system — the “rest and digest” side. They can’t both run at full capacity simultaneously.

Alcohol: This one surprises people. Alcohol helps you fall asleep faster — that part is true. But it dramatically reduces REM sleep (the deep, restorative sleep phase). A study in Annual Review of Nutrition confirmed that alcohol disrupts sleep architecture even when total sleep time isn’t affected [2].


What to eat before bed (if you must)

Sometimes you’re genuinely hungry before bed. That’s fine. But choosing the right foods can actually HELP your sleep.

Tryptophan-rich foods: Tryptophan is an amino acid that your body converts to serotonin, which converts to melatonin (your sleep hormone). Good sources:

  • Turkey
  • Warm milk
  • Bananas
  • Oats
  • Nuts (especially almonds and walnuts)

Magnesium-rich foods: Magnesium relaxes muscles and calms the nervous system:

  • Spinach
  • Pumpkin seeds
  • Dark chocolate (small amount — the cocoa has magnesium without too much caffeine)
  • Almonds

Complex carbohydrates (small portion): A small serving of complex carbs helps tryptophan cross the blood-brain barrier more efficiently. This is why a small bowl of oatmeal before bed can actually help you sleep.


The timing rule that changes everything

It’s not just WHAT you eat — it’s WHEN.

3+ hours before bed: Eat your last full meal. Your body has time to digest before sleep.

1-2 hours before bed: Small snack only. Focus on tryptophan + complex carbs. Example: a banana with a small handful of almonds.

30 minutes before bed: Nothing solid. Warm herbal tea is fine (chamomile, valerian).

The exception: If you have blood sugar issues (hypoglycemia, diabetes), a small protein-based snack before bed can prevent nighttime blood sugar crashes. In that case, a small handful of nuts or a piece of cheese is better than waking up at 3am shaking.


Foods that actually help your sleep

If you want better sleep tonight, here’s your grocery list:

FoodWhy it works
Tart cherry juiceNatural melatonin source
Kiwi (2 before bed)Shown to improve sleep onset and duration
Fatty fish (salmon)Omega-3s + vitamin D regulate serotonin
WalnutsMelatonin + magnesium
Chamomile teaApigenin binds to GABA receptors
BananasTryptophan + magnesium + potassium

A study in Nutrients found that eating two kiwis one hour before bed significantly improved sleep onset, duration, and efficiency in adults with self-reported sleep problems [3].


The gut-sleep connection

Here’s something most sleep articles miss: your gut bacteria produce about 95% of your body’s serotonin. And serotonin is the precursor to melatonin.

So when you eat foods that disrupt your gut health — processed foods, high sugar, artificial sweeteners — you’re also disrupting your serotonin production. Less serotonin means less melatonin. Less melatonin means worse sleep.

This is why probiotics and prebiotics can actually improve sleep indirectly. A healthy gut microbiome supports serotonin production, which supports melatonin production, which supports sleep.

It’s not just about avoiding certain foods before bed. It’s about what you eat all day that determines how well you sleep at night.


The bottom line

Cheese won’t give you nightmares. But eating heavy, fatty, or tyramine-rich foods before bed will make your sleep lighter and your dreams more vivid.

The real rule is simple: eat your last full meal 3+ hours before bed. If you need a snack, choose tryptophan-rich or magnesium-rich foods. Avoid alcohol, spicy food, and large meals close to bedtime.

Sleep isn’t just about what happens when you close your eyes. It’s about what happened in the hours before.


References

  1. Zuraikat FM, et al. Sleep and Diet: Mounting Evidence of a Cyclical Relationship. Annu Rev Nutr. 2021;41:223-251. https://pubmed.ncbi.nlm.nih.gov/34348025/

  2. Peuhkuri K, et al. Diet promotes sleep duration and quality. Nutr Res. 2012;32(5):309-319. https://pubmed.ncbi.nlm.nih.gov/22652369/

  3. Lin HH, et al. Effect of kiwifruit consumption on sleep quality in adults with sleep problems. Asia Pac J Clin Nutr. 2011;20(2):169-174. https://pubmed.ncbi.nlm.nih.gov/21669584/

  4. St-Onge MP, et al. Effects of Diet on Sleep Quality. Adv Nutr. 2016;7(5):938-949. https://pubmed.ncbi.nlm.nih.gov/27633109/


This post contains affiliate links. If you purchase through these links, I may earn a small commission at no extra cost to you.


Coming soon

  • Magnesium vs ashwagandha for stress — which one works faster
  • Why your iron levels matter more than you think
  • The supplement stack that actually helps with perimenopause