A handful of foods have real evidence for helping sleep: tart cherries, kiwifruit, oily fish, milk and yogurt, nuts such as almonds and walnuts, and whole grains eaten as part of an evening meal. None of them works like a sleeping pill. What they do is supply the raw materials for melatonin and serotonin, steady blood sugar overnight and cover minerals that are commonly low. Just as important is what you leave out after mid-afternoon: caffeine, alcohol, heavy or spicy meals and large amounts of sugar. The foods with the best support are below, along with how to time dinner and a bedtime snack, and a simple week of evening meals.
- Tart cherries and kiwifruit have small trials showing longer or better-quality sleep when eaten regularly.
- Foods rich in tryptophan, magnesium and omega-3, such as dairy, nuts, seeds and oily fish, support the body’s own sleep chemistry.
- Eat dinner two to three hours before bed; a small snack of carbohydrate plus protein an hour before is fine if you are hungry.
- Caffeine after 2 p.m. and alcohol within three hours of bed do more damage than any food can repair.
- Food helps ordinary poor sleep. Chronic insomnia, snoring with gasping, or restless legs need a doctor.
Table of Contents
How food affects sleep
Three mechanisms matter. First, melatonin, the hormone that signals night to the body, is made from serotonin, which is made from the amino acid tryptophan. Some foods contain melatonin directly; more supply tryptophan and the vitamins needed to convert it. Second, blood sugar swings overnight can trigger stress hormones that wake you. A balanced evening meal smooths that out. Third, some nutrients, particularly magnesium, are involved in the relaxation of muscles and the nervous system, and low intake is common.
The National Heart, Lung, and Blood Institute lists diet among the daily habits that influence sleep quality, alongside light, activity and schedule. Food is one lever among several, which is why the same dinner can be followed by a great night or a terrible one depending on what else happened that day.

The foods with the best evidence
Tart cherries
Montmorency tart cherries are one of the few foods with measurable melatonin, and a few small trials found that tart cherry juice, drunk morning and evening for one to two weeks, increased sleep time by roughly half an hour to over an hour in adults with insomnia symptoms. The studies are small and partly industry-funded, so treat the numbers as promising rather than settled. Look for unsweetened juice or frozen tart cherries rather than sweet varieties, which have much less.
Kiwifruit
A Taiwanese study gave adults two kiwifruit an hour before bed for four weeks and found they fell asleep faster and slept longer. Kiwifruit is rich in serotonin, folate and antioxidants. One trial is not proof, but two kiwis are a cheap, healthy experiment.
Milk, yogurt and curd
Dairy provides tryptophan and calcium, and warm milk before bed is a comfort ritual with a plausible basis. The tryptophan dose in a glass is small, so the effect probably owes as much to routine and satiety as to chemistry. That is still useful.
Oily fish
Salmon, mackerel and sardines supply omega-3 fats and vitamin D, both associated with better sleep in observational studies, and one trial in men eating salmon three times a week found improved sleep quality. Fish for dinner two or three times a week fits most diets.
Nuts and seeds
Almonds, walnuts, pumpkin seeds and flaxseed are good sources of magnesium; walnuts also contain a little melatonin. A small handful in the evening adds protein and healthy fat to a snack without much sugar.
Whole grains and starchy vegetables
Oats, brown rice, sweet potato and whole-grain bread eaten with dinner make tryptophan more available to the brain by shifting other amino acids into muscle. Refined carbohydrates do this too but cause a sharper blood sugar rise and fall, which is why a bowl of rice with dal or fish beats white toast and jam.
Herbal teas
Chamomile and lemon balm tea have modest evidence for relaxation and mild sleep improvement, and a warm caffeine-free drink is a good end to the evening. See herbal teas for anxiety relief for how to brew them properly.
| Food | Key nutrients | Evidence | Easy serving |
|---|---|---|---|
| Tart cherry juice | Melatonin, anthocyanins | Small trials, positive | 240 ml unsweetened, morning and evening |
| Kiwifruit | Serotonin, folate, vitamin C | One trial, positive | Two, an hour before bed |
| Milk or yogurt | Tryptophan, calcium | Weak but plausible | A glass or small bowl |
| Oily fish | Omega-3, vitamin D | One trial, observational support | Two to three dinners a week |
| Almonds, walnuts, pumpkin seeds | Magnesium, some melatonin | Observational, mechanistic | A small handful |
| Oats, brown rice, sweet potato | Complex carbohydrate, B vitamins | Mechanistic, small studies | Part of dinner |
| Bananas | Potassium, magnesium, vitamin B6 | Mechanistic | One with a few nuts |

What to avoid, and when
- Caffeine after early afternoon. It has a half-life of five to six hours, so a 4 p.m. coffee is still active at 10 p.m. Tea, cola, energy drinks and dark chocolate count.
- Alcohol within three hours of bed. It speeds falling asleep, then fragments the second half of the night and suppresses deep sleep.
- Large, fatty or spicy meals late. They sit in the stomach, raise body temperature and trigger reflux when you lie down.
- Sugary desserts and drinks. A blood sugar spike and crash can cause a 3 a.m. wake-up. Cutting evening sugar is one of the changes people notice most; see what happens when you stop eating sugar.
- Very large fluid volumes in the last hour. Enough to need the toilet at 2 a.m. is too much.
Timing: dinner and the bedtime snack
- Dinner two to three hours before bed. Build it from a protein (fish, dal, eggs, chicken, tofu), a whole-grain or starchy vegetable, and plenty of vegetables.
- Keep dinner moderate in size. Going to bed very full or very hungry both disturb sleep.
- If you are hungry an hour before bed, a small snack of 150 to 200 calories combining carbohydrate and protein works well: banana and a few almonds, oatcakes with cheese, a small bowl of yogurt, or two kiwis.
- Finish eating at least 60 minutes before lying down, longer if you get reflux.
- A warm caffeine-free drink can close the evening and double as a wind-down cue.
A week of sleep-friendly dinners
| Day | Dinner | Optional bedtime snack |
|---|---|---|
| Monday | Grilled salmon, brown rice, steamed greens | Two kiwifruit |
| Tuesday | Dal with roti, cucumber salad | Warm milk with a pinch of nutmeg |
| Wednesday | Chicken or paneer stir-fry with vegetables and quinoa | Banana with a few almonds |
| Thursday | Sardines on whole-grain toast with tomato salad | Small bowl of plain yogurt |
| Friday | Vegetable and chickpea curry with sweet potato | Tart cherry juice, 240 ml |
| Saturday | Omelette with spinach, whole-grain bread | Oatcakes with cheese |
| Sunday | Baked fish or tofu with roasted vegetables and barley | Chamomile tea and a handful of walnuts |
Common mistakes
- Expecting one banana to fix a bedtime of midnight and a wake time that changes daily. Schedule and light matter more than any food.
- Drinking sweetened cherry juice. Regular cherry drinks contain little melatonin and a lot of sugar.
- Skipping dinner to lose weight, then waking hungry at 2 a.m.
- Buying melatonin gummies as a food substitute. Supplements are a different decision, and the NIH melatonin fact sheet is a good place to read about them before asking a doctor.
- Treating a decaf coffee at 9 p.m. as harmless. Decaf still contains some caffeine, and the ritual keeps some people alert.
Who this is not for
These foods support ordinary poor sleep caused by habits and timing. They will not fix insomnia that has lasted more than three months, loud snoring with pauses in breathing, restless legs, or waking with pain. Those need a doctor. People with kidney disease should check before adding high-potassium foods such as bananas and kiwis in quantity; people with diabetes should watch the carbohydrate load of a bedtime snack and discuss it with their care team. If your main issue is falling asleep rather than food, the military sleep method is the natural next step. If you fall asleep fine but wake in the small hours, the causes in why do I wake up at 3 a.m. are more relevant.
Frequently asked questions
What is the best food to eat before bed for sleep?
Two kiwifruit, or a small snack pairing carbohydrate with protein such as banana and almonds, has the best combination of evidence and practicality.
Does warm milk really help you sleep?
Modestly. The tryptophan content is small, but the warmth, the routine and a settled stomach all help, and it does no harm.
How long before bed should I stop eating?
Finish your main meal two to three hours before bed. A light snack up to an hour before is fine for most people, longer if you have reflux.
Which foods contain melatonin naturally?
Tart cherries, walnuts, some grains such as oats and rice, and eggs contain small amounts. Tart cherries have the most, which is why they feature in most of the research.
Can food replace sleeping tablets?
No. Food supports normal sleep; it does not treat insomnia. If you rely on tablets, talk to your doctor about cognitive behavioural therapy for insomnia, which has the strongest long-term evidence.
