Foods That Help You Sleep
The best sleep-supporting foods ranked by key nutrients — tryptophan, magnesium, melatonin, vitamin B6, calcium, and potassium. Build the perfect evening snack below.
Build Your Evening Snack
Choose up to 3 sleep-friendly foods to see your combined nutrient profile.
Top Foods by Sleep Nutrient
😴 Why it matters: Converts to serotonin then melatonin — the core precursor for natural sleepiness
Soybeans (edamame)
590 mg
100 g
Pumpkin seeds
576 mg
100 g
Turkey breast
350 mg
100 g cooked
Sesame seeds
340 mg
30 g
Cheese (cheddar)
320 mg
50 g
Chicken breast
310 mg
100 g cooked
Tuna (light, canned)
297 mg
100 g
Salmon
270 mg
100 g cooked
Sardines (canned)
262 mg
100 g
Almonds
214 mg
30 g
Foods That Hurt Sleep
Sugar & refined carbs
Spikes and crashes in blood sugar cause night waking and cortisol release in the small hours.
Alcohol
Sedates initially but fragments sleep in the second half of the night, suppressing REM by up to 24%.
Spicy food
Raises core body temperature and worsens acid reflux, both of which disrupt sleep onset.
High-fat meals
Heavy, fatty meals slow digestion and elevate body temp, pushing back sleep onset by 30+ minutes.
Hidden caffeine
Tea, chocolate, some sodas, and "decaf" coffee all contain caffeine. Half-life is 5–7 hours.
Tyramine-rich foods
Aged cheeses, cured meats, and fermented foods contain tyramine which stimulates noradrenaline.
How Food Affects Sleep Quality
Sleep and nutrition are more tightly linked than most people realise. The brain requires specific raw materials to synthesise sleep-regulating neurotransmitters — and many of these come directly from the food you eat in the hours before bed. Understanding the sleep-nutrient pathway can be the difference between lying awake at midnight and drifting off in minutes.
The most important sleep-nutrition pathway starts with tryptophan — an essential amino acid found in protein-rich foods. Once consumed, tryptophan crosses the blood-brain barrier and is converted to serotonin (the mood and calm neurotransmitter), which is then converted to melatonin (the primary sleep hormone) when light levels fall. Without adequate dietary tryptophan, this cascade is limited regardless of how dark and cool your bedroom is.
The Tryptophan–Carbohydrate Trick
Tryptophan competes with other large amino acids to cross the blood-brain barrier via the same transporter. When you eat protein alone, tryptophan faces heavy competition and little reaches the brain. But when you pair tryptophan-rich foods with a small amount of complex carbohydrates, insulin is released — and insulin drives the competing amino acids into muscle, clearing the pathway for tryptophan.
This is why the classic warm milk + small banana combination has genuine scientific backing as a sleep aid: the milk provides tryptophan and calcium, the banana provides the carbohydrate trigger plus B6 (needed to convert tryptophan) and a small amount of melatonin. Pair turkey with a few crackers, or Greek yogurt with a handful of oats, for the same synergistic effect.
Magnesium: The Relaxation Mineral
Magnesium deficiency is more common than most people think — surveys suggest up to 50% of people in developed countries don't get adequate dietary magnesium. This matters enormously for sleep because magnesium activates the parasympathetic nervous system (rest-and-digest) and binds to GABA receptors in the brain, producing the same calming effect as the nervous system's natural brake.
Magnesium also suppresses the stress hormone cortisol during the overnight period. Low magnesium correlates with elevated nocturnal cortisol, which increases arousals and prevents entry into slow-wave (deep) sleep. Pumpkin seeds, chia seeds, and dark chocolate are among the highest food sources, making a small portion of any of these a genuinely therapeutic pre-sleep choice.
If you choose to supplement, magnesium glycinate or magnesium threonate are the most bioavailable forms for sleep support (200–400 mg, 30 minutes before bed). Magnesium oxide — the cheapest form — has poor absorption and is best avoided.
Tart Cherry Juice: The Most Studied Sleep Food
Tart (Montmorency) cherries and their juice are the most rigorously studied sleep foods. They contain an exceptionally high concentration of naturally occurring melatonin — a 240 ml glass of tart cherry juice delivers approximately 17,500 nanograms of melatonin, compared to 3–5 ng in typical melatonin supplements.
A 2011 randomised crossover trial published in the European Journal of Nutrition found that adults who drank two glasses of tart cherry juice daily for one week increased total sleep time by 25 minutes and sleep efficiency by 5–6% compared to placebo. A 2014 follow-up in older adults (who are more prone to insomnia) confirmed the findings.
The mechanism involves both direct melatonin delivery and inhibition of an enzyme (indoleamine 2,3-dioxygenase) that breaks down tryptophan, increasing the pool available for melatonin synthesis. Pistachios, meanwhile, contain the highest melatonin content of any tested whole food — up to 233,000 ng per 28 g serving.
Timing Your Pre-Sleep Meal
When you eat is as important as what you eat. Large meals within 2–3 hours of bedtime elevate core body temperature (as the digestive system processes food) and can trigger acid reflux — both of which directly interfere with sleep onset. Ideally, your last main meal should be 3–4 hours before bedtime.
A small sleep-supporting snack (200–300 calories) 30–60 minutes before bed is fine and may actually be beneficial if it contains the right nutrient combination. The key constraints are low fat (slow to digest), low fibre (reduces GI activity), and modest portion size. A banana with a small handful of walnuts, a small bowl of oats, or a cup of warm milk with a teaspoon of honey are ideal.
4–3 hrs before bed
Last main meal
Avoid heavy fats and spices
1 hr before bed
Optional small snack
Tryptophan + small carb
30 min before bed
Warm drink
Chamomile, warm milk, or tart cherry juice
More Sleep Tools
Sleep Calculator
Find your ideal bedtime
Sleep Debt
Track your sleep deficit
Nap Calculator
Optimize your naps
Caffeine Cutoff
Know when to stop caffeine
Baby Sleep
Age-based sleep schedules
Chronotype Quiz
Discover your sleep type
Tonight's Forecast
Live sleep environment score
Circadian Light Guide
Personalised light schedule
Jet Lag Calculator
Day-by-day recovery plan
Sleep Score
Rate last night's sleep
Moon & Sleep
Lunar phase sleep tracker
Sleep Journal
Track your sleep over time
Medical Disclaimer
The information provided by Sleep Stack is for educational and informational purposes only and is not intended as medical advice. It is not a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition or sleep disorder. Never disregard professional medical advice or delay in seeking it because of something you have read on this website.