What to Eat Before Bed to Help Sleep
What to Eat Before Bed to Help Sleep
You've heard about sleep hygiene: no screens, dim lights, cool room. But what you eat in the hours before bed may be just as important. Research published in Frontiers in Public Health confirms that evening food choices directly influence your body's melatonin and serotonin production — the two key hormones that govern when and how well you sleep. For the roughly one-third of adults who struggle with sleep quality, your dinner plate could be part of the solution.
Key Takeaways
- Tryptophan-rich foods — turkey, eggs, pumpkin seeds, cottage cheese — are the building blocks of melatonin; meta-analysis data show tryptophan intake can reduce waking after sleep onset significantly.
- Tart cherry juice raised total sleep time by 34 minutes and improved sleep efficiency by 5–6% in a randomized crossover trial of 20 healthy volunteers.
- Eating 2 kiwifruits 1 hour before bed for 4 weeks reduced sleep onset latency by 35.4% in a clinical study of adults with sleep disturbances.
- Magnesium-rich foods — pumpkin seeds, spinach, almonds — raised serum melatonin levels significantly in an 8-week double-blind RCT in insomnia patients.
- Eating within 3 hours of bedtime increased the odds of nighttime awakenings by 61% in a survey of 793 university students — timing matters as much as food choices.
Table of Contents
- How Food Affects Your Sleep Hormones
- Tryptophan-Rich Foods: The Foundation of Better Sleep
- Fruits Backed by Sleep Research: Cherries and Kiwi
- Magnesium-Rich Foods: The Mineral That Supports Melatonin
- When You Eat Matters: The Timing Rules
- What to Avoid Before Bed
- When Food Alone Isn't Enough: The Absorption Advantage
- Frequently Asked Questions
- Conclusion
1. How Food Affects Your Sleep Hormones
Sleep doesn't happen in isolation from your diet. Your brain produces melatonin — the hormone that signals it's time to sleep — from serotonin, which is itself produced from the amino acid tryptophan. Tryptophan is an essential amino acid, meaning your body cannot make it. You have to eat it. A review in Frontiers in Public Health describes how evening meals influence this entire production chain: the carbohydrate-to-protein ratio of your dinner affects how much tryptophan can cross the blood–brain barrier to begin the conversion process.
The mechanism works through insulin. When you eat carbohydrates, your body releases insulin, which shuttles competing amino acids into muscle tissue — effectively clearing the highway for tryptophan to travel to the brain. Without adequate dietary tryptophan, and without the carbohydrate signal that enables its transport, your pineal gland receives fewer raw materials to manufacture melatonin. This is why what you eat in the hours before bed can either support or undermine the sleep signals your body is trying to generate naturally.
Magnesium plays a parallel role. A double-blind RCT published in the Journal of Research in Medical Sciences found that 8 weeks of magnesium supplementation raised serum melatonin levels significantly (p=0.007), reduced cortisol, and improved multiple insomnia markers — suggesting that magnesium actively regulates the enzymes involved in melatonin production. Getting adequate magnesium through food is one of the simplest dietary changes available for sleep support.
2. Tryptophan-Rich Foods: The Foundation of Better Sleep
The most direct dietary path to better sleep is ensuring adequate tryptophan intake at dinner. A 2021 systematic review and meta-analysis in Nutrients confirmed that tryptophan supplementation significantly shortened wake after sleep onset, with doses of 1g or more producing the strongest effects. While food sources deliver smaller amounts than supplements, consistent intake of high-tryptophan foods is a practical foundation for anyone trying to improve sleep through diet.
The best food sources of tryptophan include:
- Turkey and chicken: approximately 250–300mg tryptophan per 100g — one of the highest concentrations in common foods
- Eggs: roughly 170mg per 2 large eggs; particularly effective paired with complex carbs
- Pumpkin seeds: approximately 570mg per 100g — the highest plant-based source, and also rich in magnesium
- Cottage cheese: about 190mg per 100g; slow-digesting protein that delivers tryptophan steadily overnight
- Edamame and soy products: 120–150mg per 100g; suitable plant-based option
The practical rule: pair a small serve of tryptophan-rich food with a moderate amount of complex carbohydrates — like a turkey sandwich on whole grain bread, or a small bowl of oats with nuts. Carbohydrates release insulin, which clears competing amino acids from the bloodstream and gives tryptophan a clearer path to the brain. A purely protein meal is actually less effective, because tryptophan has to compete with many other amino acids for transport. The combination works; either alone does not work nearly as well.
3. Fruits Backed by Sleep Research: Cherries and Kiwi
Among all foods studied for sleep, two fruits have the most consistent clinical evidence: Montmorency tart cherries and kiwifruit. Both contain natural melatonin and serotonin precursors, and both have been tested in clinical settings with measurable results. In a randomized crossover trial published in the European Journal of Nutrition, 20 healthy exercising adults who consumed tart cherry juice concentrate twice daily for 7 days gained 34 more minutes of total sleep time and saw a 5–6% improvement in sleep efficiency compared to placebo, with urinary melatonin metabolites rising approximately 17%.
Kiwifruit has its own strong data. A 4-week clinical study in the Asia Pacific Journal of Clinical Nutrition had 24 adults with sleep disturbances eat 2 kiwifruits 1 hour before bedtime every night. The results were notable: sleep onset latency fell by 35.4%, waking after sleep onset dropped by 28.9%, total sleep time increased by 13.4%, and sleep efficiency improved by 5.41%. Researchers attribute kiwifruit's effects to its combination of serotonin, antioxidants, and melatonin content — compounds that appear to work together on sleep architecture.
In practice, a small glass of tart cherry juice (about 240ml of unsweetened concentrate diluted in water) or 2 whole kiwifruits eaten 1 hour before bed are both evidence-supported options. It is worth noting that a pilot study in the American Journal of Therapeutics found the melatonin in cherry juice was 6 to 60 times below the 0.5–5mg therapeutic supplement dose range. The fruits support sleep through multiple mechanisms, but they do not deliver melatonin at the concentrations a supplement can.
4. Magnesium-Rich Foods: The Mineral That Supports Melatonin
Magnesium is involved in over 300 enzymatic processes in the body, including the regulation of the enzymes that produce melatonin. When magnesium levels are low, melatonin output is impaired — and approximately 50% of Americans do not meet their daily magnesium requirement through diet alone. A longitudinal study of 3,964 adults in the CARDIA cohort, published in the journal Sleep, found that higher magnesium intake was associated with better sleep quality over a 5-year follow-up period, with the top quartile of intake showing the most consistent improvements.
Foods high in magnesium that are practical as evening choices include:
- Pumpkin seeds: 156mg per 30g serve — also rich in tryptophan, making them doubly useful for sleep
- Spinach: approximately 78mg per 100g cooked; easy to include in an evening salad or stir-fry
- Almonds: 76mg per 30g serve; a small handful as a light evening snack
- Dark chocolate (70%+ cacao): about 64mg per 30g; moderate amounts only due to caffeine content
- Whole grain bread: 23–30mg per slice; useful as the carbohydrate component of a tryptophan-boosting dinner combination
It is worth acknowledging what the research does and does not say. A population study in Nutrients found higher dietary magnesium was associated with lower likelihood of daytime sleepiness in women. However, as the National Center for Complementary and Integrative Health notes, the clinical trial evidence for magnesium and sleep remains limited in quality. Eating magnesium-rich foods is sound practice for overall health and likely supports sleep, but it is unlikely to correct a serious sleep disorder on its own.
5. When You Eat Matters: The Timing Rules
The timing of your evening meal may be as important as its content. A cross-sectional study of 793 university students published in the International Journal of Environmental Research and Public Health found that eating within 3 hours of bedtime was associated with a 61% higher odds of nighttime awakenings (OR = 1.61), even after adjusting for BMI and other confounders. The proposed mechanisms include delayed gastric emptying, acid reflux, and elevated core body temperature — all of which disrupt sleep onset and continuity.
The evidence also offers a useful refinement on carbohydrate timing. A study in the American Journal of Clinical Nutrition found that high-glycemic-index carbohydrate meals shortened sleep onset latency significantly when eaten 4 hours before bedtime — but the same meal eaten just 1 hour before bed was less effective. This suggests there is an optimal window: eating your carbohydrate-containing dinner approximately 3–4 hours before bed allows the tryptophan-transport mechanism to work, while giving your digestive system time to clear before sleep.
A practical evening schedule that works with your sleep biology:
- 3–4 hours before bed: Main dinner — tryptophan-rich protein paired with moderate complex carbohydrates
- 1–2 hours before bed: Small optional snack — 2 kiwifruits or a small handful of almonds and pumpkin seeds
- 30–60 minutes before bed: Tart cherry juice (diluted) or herbal tea; no solid food
This structure keeps digestion well clear of sleep onset while allowing the food-based sleep signals to build through the evening.
6. What to Avoid Before Bed
Just as certain foods can support sleep, others actively impair it. Caffeine is the most well-studied disruptor, with a half-life of approximately 5–7 hours in the average adult — meaning a 3pm coffee still has half its stimulant effect at 8–10pm. Alcohol, despite causing initial drowsiness, suppresses REM sleep and causes fragmented sleep in the second half of the night, consistently reducing sleep quality even at moderate doses. High-sugar foods consumed close to bedtime are associated with more frequent nighttime awakenings and lighter overall sleep architecture.
Heavy, fatty, or spicy meals eaten within 2–3 hours of bedtime present a different problem: they slow gastric emptying, can trigger acid reflux when lying down, and elevate core body temperature through thermogenesis — all of which delay sleep onset. A study in Nature and Science of Sleep examining the effects of late dinner timing on sleep architecture found that a meal eaten 1 hour before bed (vs. 5 hours before bed) produced measurable changes in EEG sleep patterns and increased sleep fragmentation, particularly in men. The type of food mattered less than the timing in this study — reinforcing the idea that even a "healthy" meal eaten too late can impair sleep.
The practical avoidance list:
- Caffeine: cut off by 2–3pm for most adults
- Alcohol: finish at least 3–4 hours before bed; limit to 1–2 drinks
- High-sugar foods: desserts and sweetened beverages in the 2 hours before bed
- Heavy, fatty meals: large fried portions or rich sauces within 3 hours of sleep
- Spicy food: raises core body temperature and reflux risk
7. When Food Alone Isn't Enough: The Absorption Advantage
Dietary strategies for sleep are genuine and worth implementing — but they have a ceiling. Food sources of melatonin and its precursors deliver small, variable amounts that depend on digestion, individual metabolism, and the composition of every meal. For people with established sleep difficulties, significant sleep onset problems, or circadian rhythm disruption, food-based interventions alone rarely resolve the issue. This is where melatonin supplementation becomes relevant — and where the form of that supplement matters considerably.
Standard melatonin tablets go through first-pass metabolism in the liver, where a significant proportion is broken down before reaching the bloodstream. Bioavailability for conventional oral melatonin tablets is typically cited at 15–20%. BioAbsorb's Liposomal Liquid Melatonin addresses this directly using liposomal delivery technology, which encapsulates melatonin in phospholipid spheres that protect it from degradation in the digestive tract and transport it directly into cells. The result is 80–95% bioavailability — a meaningful difference for people who have tried standard tablets and found them inconsistent or slow-acting.
The formulation is also designed to work at a biologically appropriate dose: 1.5mg per full dropper (1ml), with a graduated dropper allowing dose adjustment in approximately 0.25mg increments. The landmark 1,683-subject meta-analysis in PLOS ONE found melatonin's effects on sleep onset latency and total sleep time were consistent across trials — and the evidence supports starting low and titrating, rather than fixed high doses. BioAbsorb's dropper format makes this practical. At $29.99 for 100 servings, manufactured in a Health Canada-approved, GMP-certified Canadian facility, third-party tested every batch, non-GMO, vegan, and gluten-free — it is a well-designed complement to the dietary foundation this article describes.
Frequently Asked Questions
What is the best snack to eat right before bed for sleep?
If you want a snack within 1–2 hours of bed, 2 kiwifruits are the most evidence-supported option — they contain natural serotonin, melatonin, and antioxidants, and a clinical trial found 35% shorter sleep onset latency after 4 weeks of nightly kiwi consumption. A small handful of pumpkin seeds and almonds (high in both tryptophan and magnesium) is a reasonable alternative. Avoid anything high in sugar, fat, or caffeine.
Does warm milk really help you sleep?
Warm milk contains tryptophan (about 90mg per 250ml) and is also a source of glycine and magnesium, so there is a plausible biological basis — not just folklore. The calming ritual of a warm drink also has a genuine relaxation effect before bed. However, the amount of tryptophan in milk is relatively modest compared to foods like pumpkin seeds or turkey, so warm milk is a mild sleep aid at best, not a substitute for broader dietary or supplementation strategies.
Can tart cherry juice replace a melatonin supplement?
No — and the research is clear on this. Analysis from the American Journal of Therapeutics showed that a full therapeutic serving of tart cherry juice delivers roughly 0.085–0.135 micrograms of melatonin — compared to the 0.5–5 milligram doses shown to be clinically effective. That is a difference of 6 to 60 times. Tart cherry juice genuinely improves sleep in its own right, likely through multiple mechanisms including anti-inflammatory polyphenols, but it does not deliver melatonin at therapeutic concentrations.
How long before bed should I eat my last meal?
For most people, finishing your last full meal 3 hours before bed is a reasonable minimum. Research shows that eating within 3 hours of bedtime raises the risk of nighttime awakenings by 61%. If you eat a carbohydrate-containing meal specifically to support tryptophan transport, eating it 4 hours before bed has been shown to be more effective for sleep onset than the same meal eaten closer to bedtime. A small sleep-supporting snack (kiwifruit, seeds) can be eaten 1 hour before bed without the same disruption risk.
What foods should I definitely avoid in the evening for better sleep?
The most important items to avoid are: caffeine (which has a 5–7 hour half-life, so even a 3pm coffee still disrupts sleep), alcohol within 3–4 hours of bed (it fragments REM sleep despite initial sedation), high-sugar foods in the 2 hours before sleep, and large fatty or spicy meals within 3 hours of bedtime. These all interfere with sleep through different mechanisms — stimulation, thermoregulation, acid reflux, or direct disruption of sleep architecture.
Will eating carbs before bed make me gain weight?
The evidence here is more nuanced than popular belief suggests. What matters more than meal timing is total calories consumed across the day and overall diet quality. A moderate serving of complex carbohydrates — oats, sweet potato, whole grain bread — as part of a sleep-supporting dinner 3–4 hours before bed is unlikely to cause meaningful weight gain in an otherwise balanced diet. The carbohydrates consistently linked to problems are high-sugar, low-fibre options, not whole food carbs at dinner.
Conclusion
What you eat before bed shapes the hormonal environment your body uses to fall and stay asleep. Prioritizing tryptophan-rich foods paired with moderate complex carbohydrates, incorporating melatonin-supporting fruits like tart cherries and kiwi, and ensuring adequate magnesium through nuts, seeds, and leafy greens gives your body the raw materials it needs for natural melatonin production. Timing matters too — finishing your main meal 3–4 hours before bed reduces disruption risk significantly. For those whose sleep difficulties go beyond what dietary changes alone can address, BioAbsorb's Liposomal Liquid Melatonin — with 80–95% bioavailability at a precise 1.5mg dose — is a well-matched next step that works alongside, not instead of, the dietary foundation you build.
Research References
- The Impact of Tryptophan Supplementation on Sleep Quality: A Systematic Review, Meta-Analysis and Meta-Regression. Nutrients, Vol. 13 (2021). Demonstrated that tryptophan supplementation significantly shortened wake after sleep onset across 18 studies, with stronger effects at doses of 1g or more.
- The Effects of Glycine on Subjective Daytime Performance in Partially Sleep-Restricted Healthy Volunteers. Frontiers in Neurology, Vol. 3 (2012). Found that 3g glycine before bedtime improved subjective sleep quality, reduced fatigue, and enhanced psychomotor vigilance in sleep-restricted adults.
- Effect of Tart Cherry Juice (Prunus cerasus) on Melatonin Levels and Enhanced Sleep Quality. European Journal of Nutrition, Vol. 51 (2012). Randomized crossover trial showing tart cherry juice increased total sleep time by 34 minutes and sleep efficiency by 5–6% versus placebo, with significant rises in urinary melatonin metabolites.
- Effect of Kiwifruit Consumption on Sleep Quality in Adults with Sleep Problems. Asia Pacific Journal of Clinical Nutrition, Vol. 20 (2011). 4-week clinical study in 24 adults demonstrating 35.4% reduction in sleep onset latency and 13.4% increase in total sleep time following nightly kiwifruit consumption.
- High-Glycemic-Index Carbohydrate Meals Shorten Sleep Onset. American Journal of Clinical Nutrition, Vol. 85 (2007). Showed that high-GI meals eaten 4 hours before bed shortened sleep onset latency significantly, linking carbohydrate intake to tryptophan transport and melatonin synthesis pathways.
- Does the Proximity of Meals to Bedtime Influence the Sleep of Young Adults?. International Journal of Environmental Research and Public Health, Vol. 17 (2020). Cross-sectional study of 793 adults finding that eating within 3 hours of bedtime raised the odds of nocturnal awakening by 61% (OR = 1.61).
- The Effect of Magnesium Supplementation on Primary Insomnia in Elderly: A Double-Blind Placebo-Controlled Clinical Trial. Journal of Research in Medical Sciences, Vol. 17 (2012). 8-week RCT in 46 participants showing magnesium supplementation significantly raised serum melatonin (p=0.007), reduced cortisol, and improved sleep time, efficiency, and insomnia severity scores.
- Association of Magnesium Intake with Sleep Duration and Sleep Quality: Findings from the CARDIA Study. Sleep, Vol. 45 (2022). Longitudinal study of 3,964 adults linking higher dietary magnesium intake to improved sleep quality over a 5-year follow-up period.
- Meta-Analysis: Melatonin for the Treatment of Primary Sleep Disorders. PLOS ONE, Vol. 8 (2013). Gold-standard meta-analysis of 19 RCTs (1,683 participants) demonstrating melatonin reduced sleep onset latency by 7.06 minutes and increased total sleep time by 8.25 minutes versus placebo.
- Effects of Dietary Carbohydrate Profile on Nocturnal Metabolism, Sleep, and Wellbeing: A Review. Frontiers in Public Health, Vol. 10 (2022). Reviewed the mechanisms by which evening carbohydrate intake influences tryptophan transport across the blood–brain barrier, supporting serotonin and melatonin synthesis.
- Pilot Study of Tart Cherry Juice for the Treatment of Insomnia and Investigation of Mechanisms. American Journal of Therapeutics, Vol. 25 (2018). Randomized double-blind placebo-controlled trial confirming tart cherry juice improved sleep duration and efficiency, while clarifying that melatonin from food delivers far lower concentrations than therapeutic supplement doses.
About the Author
David Kimbell is a health writer, digital entrepreneur and former aerospace engineer, based in Ottawa, Canada. He loves translating complex science into clear, actionable guidance for consumers seeking evidence-based solutions.
Important Disclaimers
Medical Disclaimer: This article provides educational information only and is not intended as medical advice. Always consult with a qualified healthcare provider before starting any new supplement, especially if you have existing health conditions, take medications, or are pregnant or nursing.
FDA/Health Canada Statement: These statements have not been evaluated by the Food and Drug Administration or Health Canada. This product is not intended to diagnose, treat, cure, or prevent any disease.