Best Foods for Sleep: What to Eat, How Much and When

Tart cherry juice, kiwi, fatty fish and an early carb-based dinner have the best evidence for sleep. The doses, the timing and how small each study was.

N
NSDR.co
Science-backed relaxation
15 min read
Best Foods for Sleep: What to Eat, How Much and When

The best foods for sleep, judged by the trials behind them, are tart cherry juice, kiwi, fatty fish and a carbohydrate-based dinner eaten a few hours before bed. Dairy, chamomile tea, pumpkin seeds, oats and nuts have weaker or indirect evidence. Every one of these studies is small, so treat food as a nudge. Finish dinner about three hours before bed, keep caffeine and alcohol out of the evening, and give any change two weeks.

As Lulu Guo, a board-certified sleep medicine physician who reviews for the Sleep Foundation, puts it, "It's better to focus on overall healthy dietary patterns throughout the day rather than focus on a specific food or drink to improve sleep." The foods below are extras on top of a good overall diet.

Health note: food changes don't treat insomnia or sleep apnea. If poor sleep lasts more than a few weeks, see a doctor, and check with one before taking a magnesium supplement if you're on medication.

TL;DR

  1. Food reaches sleep through three routes: melatonin in the food, tryptophan that your body turns into melatonin, and magnesium.
  2. The two tart cherry juice trials used about 8 oz twice a day. The famous "84 extra minutes" came from 8 people.
  3. Two kiwis an hour before bed for four weeks was followed by better sleep in 24 adults, in a study with no control group.
  4. Turkey alone is unlikely to make you sleepy. Protein lowers the share of tryptophan that reaches your brain, and carbohydrate raises it.
  5. Finish dinner about three hours before bed and have your last coffee at least 8.8 hours before.
  6. Alcohol gets you to sleep faster, then breaks up the second half of the night.

Why food affects sleep

The three routes: melatonin, tryptophan and magnesium

Some foods contain melatonin, the hormone that makes you sleepy as evening comes on. Others supply tryptophan, an amino acid your body turns into serotonin and then melatonin. A third group is high in magnesium, which acts on the brain's GABA and NMDA receptors. Trials of magnesium for sleep disagree with each other, so that route is the least certain.

How much melatonin is in food

Very little. Montmorency tart cherries hold about 13.5 nanograms of melatonin per gram, so a 100 g serving has roughly 0.0013 mg. In an MIT study of adults over 50, the dose that brought night-time melatonin back to normal was 0.3 mg, about 220 times more.

Food can still have an effect. Tart cherry concentrate raised the melatonin in people's urine in one trial, and the authors of the biggest cherry result think part of the effect may come through tryptophan. The mechanisms are unsettled. Judge each food by its trial.

Your whole diet counts

In a Columbia University sleep-lab study of 26 adults, more fibre went with more deep (slow-wave) sleep, more saturated fat with less, and more sugar and other non-fibre carbohydrate with more brief arousals from sleep. It's one small study of a single day's free eating, but it fits Dr Guo's point about the whole diet. For the non-food side, see our full sleep habits checklist.

Melatonin-rich foods

Tart cherries and tart cherry juice

The three best-known tart cherry trials are small, and they don't all agree.

  • 20 healthy adults, 7 days (Howatson 2012). Concentrate raised urinary melatonin and increased time in bed, total sleep and sleep efficiency compared with placebo.
  • 15 older adults with insomnia, 2 weeks (Pigeon 2010). Juice cut time awake after first falling asleep, but didn't change how fast people fell asleep or how long they slept. The authors called the effects "considerably less" than sleeping pills or therapy for insomnia.
  • 8 adults over 50 with insomnia, 2 weeks (Losso 2018). Eleven started and three were referred on for sleep apnea. The eight who finished slept 84 minutes longer in a sleep lab on cherry juice than on placebo. The Cherry Marketing Institute supplied the juice.

That 84-minute figure is real, and it comes from eight people.

To copy the two juice trials, drink about 8 oz (240 mL) twice a day, in the morning and one to two hours before bed, for two weeks. Nobody has tested a bowl of fresh cherries.

Kiwi

In a 2011 Taiwanese study, 24 adults with sleep problems (22 of them women) ate two kiwis an hour before bed every night for four weeks. By the end they took 35% less time to fall asleep, spent 29% less time awake in the night and slept 13% longer.

There was no control group, so expectation could explain some of it. The researchers credit kiwi's serotonin and antioxidants, not melatonin. Two kiwis a night for four weeks is a cheap test.

Eggs, milk and nuts

Eggs contain about 1.54 ng of melatonin per gram, according to the Sleep Foundation. Milk taken from cows at night has about ten times the melatonin of daytime milk (39 vs 4 picograms per mL in a Brazilian study). But when Finnish researchers gave night-time milk to older care-home residents for eight weeks, their rated sleep changed only with the season.

A 2017 review found nuts have the most melatonin of any plant food, and eggs and fish lead the animal foods. A 2020 review of 14 dairy studies found mixed results that lean toward better sleep when dairy is part of a balanced diet.

Tryptophan foods

Turkey and the one-gram problem

Turkey has about a quarter of a gram of tryptophan per 100 g (Sleep Foundation). Supplement studies found tryptophan helps at 1 g or more, mostly in people with mild insomnia. Getting 1 g from turkey takes about 400 g, close to a pound.

Tryptophan also competes with other amino acids to get into the brain. In a small MIT study, the blood tryptophan ratio differed by a median 54% between a carbohydrate-rich and a protein-rich breakfast in the eight people who ate both. Earlier work found carbohydrate raises that ratio and protein lowers it. A big turkey dinner brings plenty of competitors along with its tryptophan.

Why carbohydrate at dinner may help

Twelve healthy young men ate a rice dinner four hours before bed. After high-glycaemic jasmine rice they fell asleep in 9 minutes on average, against 17.5 minutes after low-glycaemic rice. The same jasmine meal one hour before bed took 14.6 minutes. Eat your carbohydrates at dinner, and eat dinner early.

Cheese, tofu and fatty fish

Cottage cheese, low-fat ricotta and mozzarella are among the top cheeses for tryptophan, and a cup of firm tofu has about 593 mg (Sleep Foundation). That's a lot for a food and still under the 1 g supplement dose.

Fatty fish has one longer trial. In a US secure hospital, 95 men ate either Atlantic salmon or a meat meal three times a week from September to February. The meat group took longer to fall asleep by the end of winter, and the salmon group reported better daytime functioning. It's a single trial in an unusual setting.

Magnesium-rich foods

What the magnesium research shows

A 2022 review of nine studies (7,582 people) found magnesium levels linked to sleep quality in observational studies, while the trials contradicted each other. One trial in 46 older adults with insomnia found a 500 mg magnesium supplement, taken for eight weeks, improved insomnia scores and time to fall asleep. If you're weighing a supplement, read magnesium glycinate vs citrate.

Pumpkin seeds, spinach and oats

Per the Sleep Foundation:

  • An ounce of pumpkin seeds (a small handful): 37% of the daily value for magnesium.
  • A cup of boiled spinach: 37%.
  • A cup of uncooked oats: 66%.

Oats are also a carbohydrate, which helps tryptophan reach the brain, so an evening bowl covers two routes.

Bananas and almonds

A cup of sliced banana gives up to 10% of the daily value for magnesium, which is modest. For almonds, there's a 2026 Indian trial funded by the Almond Board of California: 175 adults with poor sleep ate either 60 g of almonds a day (about 50 nuts) or a snack with the same calories for five months. The almond group rated their sleep better and reported falling asleep faster, but most sleep-lab measures didn't change, and participants knew which snack they were eating.

Chamomile tea

Most sleep-food guides recommend chamomile tea. A 2019 meta-analysis found a pooled improvement in sleep quality with chamomile, and the authors say larger trials are needed to confirm it. The one trial in people with diagnosed insomnia found no significant change in insomnia severity. A caffeine-free cup in the evening is a reasonable part of a wind-down routine.

When to eat

The three-hour rule

Finish dinner about three hours before bed, so by 7pm for a 10pm bedtime. In a survey of 793 university students, eating within three hours of bed was linked to more waking in the night, though not to taking longer to fall asleep. In a Japanese study of 147 people with acid reflux and 294 without, finishing dinner less than three hours before bed came with 7.45 times the odds of reflux compared with four hours or more. Both are observational, so neither proves cause.

A bedtime snack

If you're hungry later, keep it small. Two kiwis an hour before bed is the best-tested snack, and tart cherry juice fits one to two hours before. Pairings such as yogurt with pumpkin seeds or oatmeal with banana are reasonable but untested.

Evening food timeline for a 10pm bedtime: coffee by 1pm, dinner by 7pm, kiwis at 9pm.
Evening food timeline for a 10pm bedtime: coffee by 1pm, dinner by 7pm, kiwis at 9pm.

Caffeine cutoff

Caffeine's half-life averages about four hours in healthy adults, with a range of two to eight, according to the European Food Safety Authority. At four hours, a 2pm coffee still has about a quarter of its caffeine left at 10pm. A 2023 meta-analysis of 24 studies found caffeine cut total sleep by 45 minutes and put the cutoff for a cup of coffee at 8.8 hours before bed, around 1pm for a 10pm bedtime. Huberman's stricter rule is 12 hours.

The FDA also lists tea, chocolate, soft drinks, energy drinks, energy bars and some over-the-counter medicines as caffeine sources. More in how long caffeine stays in your system.

Foods and drinks to avoid before bed

Alcohol

Alcohol helps you fall asleep faster, then breaks up the second half of the night. A 2013 review of all known studies in healthy sleepers found it delays your first REM period at any dose and lowers total REM in most studies at moderate and high doses.

Heavy, spicy, fatty and sugary food

The Sleep Foundation lists spicy food as a trigger for heartburn and reflux before bed, which makes the three-hour gap matter most if you're prone to it. In the Columbia sleep-lab study, a bigger share of calories from saturated fat predicted less deep sleep, and a bigger share from sugar went with more brief arousals from sleep. If you want something sweet, have it with dinner rather than as a large snack at bedtime.

Beyond food: the bedroom and supplements

Room temperature

The Sleep Foundation puts the best bedroom temperature at about 65°F (18.3°C), with most doctors recommending 65 to 68°F. Cleveland Clinic gives 60 to 67°F. A 2012 review found that in normal bedding, heat increases waking and cuts both deep and REM sleep, and Huberman's sleep newsletter says body temperature needs to drop by 1 to 3 degrees for you to fall and stay asleep. More in the best bedroom temperature for sleep.

Melatonin supplements vs food

In his Sleep Toolkit episode, Huberman says the doses in most melatonin products are "far, far, far greater" than what the body makes. In the MIT study above, 0.3 mg brought night-time levels back to normal, while 3 mg kept melatonin raised into the next morning. A 1997 study of 21 night-shift workers found a week of melatonin left their own production unchanged. Read melatonin side effects and doses before you buy a bottle.

How long before you see results

The cherry and kiwi trials behind the best foods for sleep ran one to four weeks. Change one thing at a time, keep it up for two weeks, and track how long you take to fall asleep and how often you wake.

If you get into bed wired, food won't fix that alone. A guided session may help you downshift first, and NSDR for sleep covers how to use one at bedtime.

FAQ

What is the best snack to eat before bed for sleep?

The best-tested bedtime snack is two kiwis about an hour before sleep, from a four-week study of 24 adults. Tart cherry juice one to two hours before bed is the other option with trial data. Keep any snack small.

How long before bed should you stop eating?

Stop eating full meals about three hours before bed. Eating inside that window was linked to more night waking in a survey of 793 students and to higher odds of reflux in a Japanese study. A small snack an hour before bed is fine.

Does eating certain foods improve sleep quality?

Certain foods do seem to improve sleep quality a little. Kiwi, tart cherry juice, fatty fish and a high-glycaemic rice dinner all showed effects, but in trials of 8 to 95 people, and the kiwi study had no control group. Even the best foods for sleep are modest. The authors of one cherry trial judged its effects "considerably less" than those of sleeping pills or therapy for insomnia.

What foods are high in melatonin?

Nuts have the most melatonin among plant foods, and eggs and fish among animal foods, according to a 2017 review. Montmorency tart cherries hold about 13.5 ng per gram, and milk collected at night has about ten times more than daytime milk. All of these are tiny next to a 0.3 mg supplement.

Can changing your diet improve sleep quality?

Changing your diet can improve sleep quality modestly. More fibre and less saturated fat and sugar went with deeper, less broken sleep in a 26-person lab study, and a review of 14 dairy studies leaned toward better sleep with a balanced diet. Give any change two weeks.

Sources