The Best Foods to Help You Sleep (and 4 That Keep You Up)
By Vita · Vitaminico's AI nutrition coach (educational, not medical advice)
Updated
The foods that help you sleep at night pair a tryptophan-rich food with a little slow carbohydrate — oats with milk, a banana with a few pumpkin seeds, or wholegrain toast with turkey — because the carbohydrate clears the way for tryptophan to reach your brain and become melatonin. Magnesium and vitamin B6 from the same plate help finish the job, while four everyday habits quietly undo it.
Key facts — eating for a better night (adult values from the NIH Office of Dietary Supplements, verified July 2026)
- The pairing that works: a tryptophan food plus a little slow carbohydrate at night helps more than either alone — the carb is what ferries tryptophan to the brain.
- Magnesium calms the nervous system so the body can settle; pumpkin seeds, spinach, beans and almonds carry it, and food comes with no upper limit — the 350 mg ceiling is for supplements only.
- Vitamin B6 (about 1.3 mg a day for most adults) helps turn tryptophan into serotonin and melatonin; salmon, chickpeas, bananas and potatoes supply it.
- Four evening saboteurs — late caffeine, the nightcap, a heavy or spicy dinner, and a big sugary dessert — undo good eating whatever else is on the plate.
- Timing beats quantity: a small snack about an hour before bed helps; a large late meal works against you.
Do certain foods really help you sleep, or is that a myth?
Certain foods genuinely nudge you toward sleep — not by sedating you, but by giving your brain the raw materials it needs to make melatonin. No single food is a sleeping pill, and none can out-argue a triple espresso or a midnight scroll. What food does is stack the odds: the right snack, eaten at the right time, makes falling and staying asleep a little easier. Per the Harvard Nutrition Source, both what and when you eat shape how quickly you drift off.
Which foods actually help you sleep?
The most reliable sleep foods pair a source of tryptophan with a modest slow carbohydrate and add magnesium where they can. Per NIH ODS, magnesium helps calm the nervous system, and many adults fall short of the recommended intake — one reason a magnesium-rich evening plate is a smart first move.
| Food | What it brings to sleep | Best way to eat it | Why it works (the because) |
|---|---|---|---|
| Oats | Slow carbohydrate plus a little natural melatonin | A small warm bowl about an hour before bed | The steady carb helps tryptophan reach the brain to become melatonin |
| Milk or plain yoghurt | Tryptophan plus calcium | Warm milk, or yoghurt with a few oats | Calcium helps the brain turn tryptophan into the sleep hormone |
| Turkey, chicken or tofu | Tryptophan plus vitamin B6 | A small portion at an earlier dinner, not at bedtime | B6 is the tool that converts tryptophan into serotonin then melatonin |
| Pumpkin seeds, almonds, spinach | Magnesium | A small handful of seeds, or spinach folded into dinner | Magnesium calms the nervous system so muscles and mind can settle |
| Bananas or chickpeas | B6, magnesium and slow carbs together | A banana with a few nuts as a bedtime snack | One food carries the carb, the mineral and the converter at once |
| Kiwifruit or tart cherries | Naturally occurring compounds studied for sleep | One or two in the evening | Modest, still-emerging evidence — a pleasant extra, not a sleeping pill |
Bottom line: build the evening around a tryptophan food plus a small slow carb, and let magnesium-rich seeds and greens do the quiet background work.
Why does eating a carb at night help tryptophan work?
A bedtime carbohydrate helps because it clears tryptophan's path into the brain — the real reason warm milk feels sleepy. Tryptophan has to compete with other amino acids for the same doorway across the blood-brain barrier, and in a protein-heavy meal it usually loses. Here is the sequence that tips it in your favour:
- You eat a little slow carbohydrate. Your body releases a small amount of insulin in response.
- Insulin clears the competition. It pulls the rival amino acids out of your bloodstream and into muscle, but largely leaves tryptophan behind.
- Tryptophan wins the doorway. With fewer competitors, more of it crosses into the brain, where B6 helps turn it into serotonin and then melatonin.
According to the Harvard Nutrition Source, carbohydrate-containing meals raise the amount of tryptophan that reaches the brain — which is why a tryptophan food paired with a slow carb beats either one eaten alone. The words that matter are small and slow: a big sugary load spikes and then crashes your blood sugar instead, which is its own kind of saboteur.
What are the 4 foods and drinks that keep you up?
The four biggest evening saboteurs are late caffeine, alcohol, a heavy or spicy dinner, and a big sugary dessert — each hurts sleep a different way.
| Saboteur | Why it wrecks your sleep | The fix |
|---|---|---|
| Late caffeine | It has a four-to-six-hour half-life and blocks the brain's "time to rest" signal | Keep coffee, cola and strong tea to the morning |
| The nightcap | Alcohol helps you fall asleep, then fragments the second half of the night and cuts deep sleep | Finish drinks a few hours before bed; skip the bedtime one |
| A heavy or spicy dinner | Rich, fatty or spicy food keeps digestion busy and can trigger reflux when you lie down | Eat the big meal earlier; keep any late snack light |
| A big sugary dessert | A sugar spike is followed by a dip that can nudge you awake in the small hours | Swap it for a small slow-carb snack, or bring dessert forward |
Bottom line: the same slow carb that helps in a small bedtime snack becomes a saboteur as a large sugary dessert — size and timing decide which one you get.
When is broken sleep not about food at all?
Food builds a strong foundation for sleep, but it cannot fix a sleep disorder. Persistent night waking can come from sleep apnea, thyroid problems, anxiety, or the hormone shifts of perimenopause, and those need more than a better dinner. Restless, crawling legs that ruin sleep can trace to low iron stores, which a simple ferritin test can check with your provider. If loud snoring, gasping or all-day exhaustion are in the picture — or good food changes nothing after a few weeks — see your provider rather than adding another supplement. This is educational, not a diagnosis.
Sources: NIH Office of Dietary Supplements, Harvard Nutrition Source. Educational only — not a diagnosis.
Find your likely gap — free
The fastest way to know which food change will actually help is to find your most likely gap. Tell Vita how you sleep — the free 2-minute check weighs your answers across nine body systems and names the single nutrient most likely behind your restless nights, so you can start with the one plate change that moves the needle. The full evening playbook lives in our guide to sleeping through the night, naturally.
Key takeaways
- Pair a tryptophan food with a small, slow carbohydrate at night — the carb is what ferries tryptophan to the brain to become melatonin.
- Lean on magnesium-rich seeds and greens plus B6-rich fish, poultry and chickpeas, and keep the snack small and about an hour before bed.
- Late caffeine, the nightcap, a heavy dinner and a big sugary dessert are the four everyday habits that quietly keep you up.
Questions people ask
What foods help you sleep through the night?
The most reliable options pair a tryptophan food with a small slow carbohydrate: oats with warm milk, a banana with a few pumpkin seeds, or wholegrain toast with turkey. Add magnesium-rich seeds and greens across the day, keep the bedtime portion small, and eat your heavy meal earlier. The practical next step is to find which gap is most likely yours.
Does eating carbs before bed help you sleep?
A small, slow carbohydrate can help, because it prompts a little insulin that clears rival amino acids from your blood and lets more tryptophan reach the brain to become melatonin. The key is small and slow: a bowl of oats or wholegrain toast helps, while a large sugary dessert spikes and then crashes your blood sugar and can wake you later.
What foods and drinks should I avoid before bed?
The four biggest saboteurs are late caffeine, alcohol, heavy or spicy meals, and large sugary desserts. Caffeine can stay active for hours and blocks your tiredness signal, alcohol fragments the second half of the night, and rich food and sugar spikes both disturb sleep. Bring them earlier in the day, or keep the late snack small and light.
How long before bed should I eat?
Finish a large or heavy meal a couple of hours before bed so digestion is not competing with sleep, and keep any bedtime snack small — around an hour before lights-out is a good window. It is the size and richness of the late meal that matter most, not whether you eat anything at all.