Best Foods for Better Sleep Quality: What the Science Actually Says
TL;DR: Certain foods genuinely improve sleep quality by supplying melatonin precursors, magnesium, and tryptophan. The most evidence-backed options include tart cherry juice, kiwi fruit, fatty fish, almonds, and oats. Timing matters too: a small carbohydrate-rich snack 1–2 hours before bed can support sleep onset. Caffeine in the afternoon, alcohol before bed, and large meals too close to your sleep window consistently disrupt rest.
Table of Contents
- Why What You Eat Affects How You Sleep
- Key Nutrients That Support Sleep
- 10 Best Foods for Better Sleep
- What to Eat Before Bed (and When)
- Foods and Drinks to Limit Before Bed
- A Simple Sleep-Friendly Evening Eating Plan
- The Bottom Line
Why What You Eat Affects How You Sleep
You have probably tried cutting screen time, keeping a consistent bedtime, and sleeping in a cool room — and those habits genuinely work. But if you are still waking up groggy or lying awake longer than you would like, what you eat (and when) might be part of the equation.
The best foods for better sleep work through real physiological pathways. Sleep is regulated by two key hormones: melatonin, which signals that it is time to rest, and serotonin, a precursor to melatonin that also promotes calm and relaxation. Your body manufactures both from dietary building blocks — primarily the amino acid tryptophan, along with specific vitamins and minerals. This means the foods on your plate can directly influence how quickly you fall asleep, how deeply you sleep, and how rested you feel in the morning.
Research consistently links poor dietary patterns to shorter sleep duration and worse sleep quality. This relationship is also bidirectional: poor sleep drives cravings for high-sugar, high-fat foods the following day, creating a cycle that affects both your health and your rest.
Key Nutrients That Support Sleep
Before diving into specific foods, it helps to understand which nutrients are doing the work:
Tryptophan is an essential amino acid and the raw material for both serotonin and melatonin. Your body cannot make it — you have to eat it. Good dietary sources include turkey, chicken, dairy, nuts, seeds, and oats.
Magnesium activates the parasympathetic nervous system — your body’s “rest and digest” state — and regulates GABA, a calming neurotransmitter. Many adults do not meet the recommended intake of 310–420 mg per day (National Institutes of Health). Low magnesium is associated with insomnia and restless sleep.
Melatonin itself is present in small but meaningful amounts in a few foods, particularly tart cherries and walnuts. Dietary melatonin can directly supplement what your pineal gland produces.
Complex carbohydrates help shuttle tryptophan across the blood-brain barrier by stimulating insulin release, which clears competing amino acids from circulation. A modest carb-containing snack in the evening amplifies the effect of tryptophan-rich foods consumed earlier in the day.
Vitamin B6 is a cofactor in the conversion of tryptophan to serotonin. Low B6 intake is associated with sleep disturbances in observational research.
10 Best Foods for Better Sleep
1. Tart Cherries and Tart Cherry Juice
If there is one food with the strongest direct clinical evidence for sleep improvement, tart cherries have the best case. A randomized controlled trial by Howatson et al., published in the European Journal of Nutrition (2012), found that participants who drank tart cherry juice for seven days had significantly higher urinary melatonin levels and reported improvements in sleep duration and quality compared to a placebo group (PMID: 21999609).
Tart cherries (Montmorency variety) are one of the few whole foods with naturally measurable melatonin. They are also rich in anthocyanins, which have anti-inflammatory properties that may support the recovery processes that occur during sleep.
How to use it: Drink 240 ml (8 oz) of unsweetened tart cherry juice about 1–2 hours before bed, or eat a small handful of dried tart cherries as an evening snack.
2. Kiwi Fruit
Kiwi is one of the more surprising entries on this list, but it is backed by a genuine clinical trial. A study by Lin et al. published in Asia Pacific Journal of Clinical Nutrition (2011) followed 24 adults with self-reported sleep problems who ate two kiwifruits one hour before bedtime every night for four weeks (PMID: 22038497). The results showed significant improvements in sleep onset time, total sleep time, and sleep efficiency compared to baseline.
Researchers attribute this effect to kiwi’s serotonin content, high vitamin C and E levels, and folate — folate deficiency has been independently linked to disrupted sleep in some studies.
How to use it: Eat two kiwi fruits about one hour before bed, on their own or alongside a small serving of plain yogurt.
3. Fatty Fish (Salmon, Mackerel, Sardines)
Fatty fish combine three sleep-relevant nutrients: omega-3 fatty acids, vitamin D, and tryptophan. Research suggests that DHA (a key omega-3) supports serotonin pathway function, and vitamin D deficiency is associated with sleep disorders in multiple observational studies. While controlled trials specifically on fish and sleep are limited, the nutrient profile makes fatty fish a strong dietary ally for rest.
The American Heart Association already recommends two servings of fatty fish per week for cardiovascular health — sleep quality is an additional reason to follow that guidance.
How to use it: Aim for two servings of fatty fish at dinner per week. Baked salmon with roasted vegetables or sardines on whole-grain toast are easy weeknight options.
4. Almonds
Almonds are one of the best dietary sources of magnesium, providing about 76 mg per 28 g (1 oz) serving — roughly 18–25% of the recommended daily value. A randomized, double-blind, placebo-controlled trial published in the Journal of Research in Medical Sciences (2012) found that magnesium supplementation significantly reduced sleep onset time and increased total sleep duration in elderly participants with insomnia (PMID: 23853635).
While that trial used supplemental magnesium, consistently eating magnesium-rich foods like almonds helps maintain adequate levels, particularly for people who fall short through diet alone.
How to use it: A small handful (about 23 almonds / 28 g) as an evening snack. Pair with a banana for an added boost of tryptophan and potassium.
5. Walnuts
Walnuts are one of the few plant foods with measurable melatonin content. They are also rich in ALA (a plant-based omega-3), magnesium, and tryptophan — a concentrated trio of sleep-supporting nutrients. Research has confirmed that consuming walnuts raises blood melatonin concentrations.
For people looking to add melatonin-containing foods to their diet without supplementing, walnuts are among the best whole-food options available.
How to use it: A small handful (about 28 g) in the evening, eaten plain, added to oatmeal, or paired with tart cherry juice.
6. Chamomile Tea
Chamomile has been used as a sleep and relaxation aid for centuries, and there is a plausible biological mechanism behind it. Chamomile contains apigenin, a flavonoid that binds to benzodiazepine receptors in the brain — the same receptors targeted by certain anti-anxiety medications — producing a mild sedative effect without the side effects of pharmaceutical agents.
Clinical trials have found that chamomile extract improved sleep quality in elderly adults and reduced nighttime waking compared to placebo. The effect is modest but consistent with the mechanism.
How to use it: Brew one cup of chamomile tea 45–60 minutes before bed. Look for products that list Matricaria chamomilla as the active ingredient for the strongest apigenin content.
7. Oats
Oats cover multiple sleep-support pathways at once. They contain tryptophan, and their complex carbohydrates help shuttle that tryptophan into the brain more efficiently. They also provide small amounts of melatonin, and their beta-glucan fiber stabilizes blood sugar overnight — preventing the glucose dips that cause nighttime waking.
Oats also supply magnesium and vitamin B6, both of which support the tryptophan-to-melatonin conversion. For something you can eat practically every day, oats offer an unusually strong nutrient-per-cost ratio for sleep.
How to use it: A small bowl of oatmeal (about half a cup dry) as an evening snack 1–2 hours before bed. Keep it simple — warm oats with a drizzle of honey and a sliced banana work well.
8. Turkey and Chicken
These are the most widely known tryptophan sources, though the “turkey makes you sleepy” story is somewhat overstated — turkey does not contain dramatically more tryptophan than other proteins. Still, both turkey and chicken are genuinely reliable tryptophan sources when paired correctly.
The key is combining them with complex carbohydrates at dinner. Tryptophan competes with other large amino acids for transport across the blood-brain barrier; carbohydrates trigger insulin release, which clears those competing amino acids and gives tryptophan a relative advantage for brain uptake.
How to use it: Grilled chicken or turkey breast at dinner, paired with a side of brown rice, sweet potato, or quinoa — not eaten alone.
9. Bananas
Bananas deliver magnesium, tryptophan, vitamin B6, and potassium in a single, convenient package. Vitamin B6 specifically accelerates the conversion of tryptophan to serotonin. Magnesium and potassium both act as natural muscle relaxants, reducing nighttime restlessness — particularly beneficial if leg cramps or tension disrupt your sleep.
Bananas are also easy to pair with other sleep-supportive foods, making them a natural anchor for an evening snack.
How to use it: One medium banana as an evening snack, paired with a tablespoon of almond butter for protein and healthy fat that slows digestion.
10. Dairy (Milk, Yogurt, Cottage Cheese)
Dairy products provide both tryptophan and calcium. Calcium helps the brain convert tryptophan into melatonin more efficiently — meaning dairy combines the substrate and the cofactor in a single food. Warm milk has a centuries-old folk-remedy reputation for sleep, and while the evidence is largely anecdotal, the underlying nutrients are real.
Plain yogurt and cottage cheese are excellent alternatives with fewer added sugars than flavored varieties, and they double as a source of gut-supporting probiotics.
How to use it: A small serving of warm milk, plain Greek yogurt, or cottage cheese (about 100–150 g) as an evening snack, 1–2 hours before bed.
What to Eat Before Bed (and When)
Timing your evening eating is as important as the foods themselves.
1–2 hours before bed: This is the ideal window for a small sleep-supportive snack if you tend to feel hungry at night or struggle to fall asleep. Good options: tart cherry juice with a handful of walnuts, a banana with almond butter, a small bowl of oatmeal, or two kiwi fruits.
3+ hours before bed: Aim to finish your main meal at least three hours before sleep. Large meals close to bedtime raise core body temperature (which must drop for sleep onset) and elevate blood sugar and digestive activity.
Right before bed: Avoid eating immediately before lying down — it increases the risk of acid reflux, elevates core temperature, and disrupts the early phases of your sleep cycle.
For more on building a complete sleep-supportive routine that goes beyond food, see the guide on how to sleep better at night naturally.
Foods and Drinks to Limit Before Bed
The same way certain foods support sleep, others reliably undermine it:
Caffeine has a half-life of approximately 5–7 hours, meaning a coffee at 2 pm still has roughly half its stimulant load in your system by 7 pm. Sleep researchers generally recommend stopping caffeine by early-to-mid afternoon, especially if you are sensitive to it. This applies to coffee, black and green tea, energy drinks, and many sodas.
Alcohol is widely self-prescribed as a sleep aid, but research is unambiguous: alcohol impairs sleep quality even when it accelerates sleep onset. It suppresses REM sleep (the restorative stage) in the first half of the night and increases sleep fragmentation in the second half. Using alcohol to fall asleep consistently worsens sleep architecture over time.
Heavy, fatty, or spicy meals close to bedtime delay gastric emptying, raise body temperature, and increase acid reflux risk — all of which fragment sleep.
Added sugars and refined carbohydrates in the evening produce blood sugar spikes followed by crashes that can trigger nighttime waking. They also displace the nutrient-dense foods that actually support sleep.
Research also consistently links ultra-processed food consumption to shorter sleep duration. If you want to improve both sleep and overall health, reducing processed food intake is one of the highest-leverage dietary changes you can make. For a practical starting point, see the guide on the healthiest foods to eat every day.
A Simple Sleep-Friendly Evening Eating Plan
You do not need to overhaul your diet to see results. These small, stackable changes can meaningfully improve sleep quality within a few weeks:
Earlier in the day:
- Include a tryptophan-rich protein (chicken, turkey, fatty fish, or dairy) at dinner, always paired with complex carbohydrates.
- Eat almonds or walnuts as your afternoon snack instead of processed options.
- Aim for two servings of fatty fish per week at your evening meal.
Evening (1–2 hours before bed):
- Swap afternoon and evening coffee or black tea for chamomile tea.
- Have a small sleep-supportive snack: tart cherry juice with walnuts, a banana with almond butter, or a small bowl of plain yogurt with kiwi fruit.
- Stop eating 2–3 hours before bed to allow digestion to settle.
What to cut:
- Move your last caffeine to no later than early afternoon.
- Avoid alcohol within 3 hours of bedtime.
- Limit high-sugar desserts close to bed.
These dietary changes work best alongside other sleep hygiene habits. Blue light from screens in the evening actively suppresses melatonin — the same hormone these foods help to build. For the evidence on screen time and sleep, see screen time before bed effects on sleep.
The Bottom Line
The science on food and sleep is still developing, but the evidence is strong enough to make dietary choices a genuinely useful tool for better rest. Tart cherry juice, kiwi fruit, magnesium-rich almonds, and tryptophan sources like turkey, dairy, and oats all have credible biological mechanisms — and in several cases, direct clinical trial support. Equally important is managing the common disruptors: afternoon caffeine, evening alcohol, and large meals too close to your sleep window.
Start with one or two changes — perhaps a cup of chamomile tea and two kiwi fruits before bed — and track how you feel over the following week. Small, consistent dietary adjustments often produce noticeable improvements in sleep within two to four weeks.
References
- Howatson G, et al. Effect of tart cherry juice (Prunus cerasus) on melatonin levels and enhanced sleep quality. European Journal of Nutrition. 2012;51(8):909–916. PMID: 21999609
- Lin HH, et al. Effect of kiwifruit consumption on sleep quality in adults with sleep problems. Asia Pacific Journal of Clinical Nutrition. 2011;20(2):169–174. PMID: 22038497
- Abbasi B, et al. The effect of magnesium supplementation on primary insomnia in elderly: a double-blind placebo-controlled clinical trial. Journal of Research in Medical Sciences. 2012;17(12):1161–1169. PMID: 23853635
- St-Onge MP, et al. Fiber and saturated fat are associated with sleep arousals and slow wave sleep. Journal of Clinical Sleep Medicine. 2016;12(1):19–24. PMID: 26156950
This content is for informational purposes only and is not a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider before making changes to your diet, exercise routine, or health regimen.