Foods & Nutrients

Nutrition and Sleep: What the Evidence Actually Supports

Which foods and drinks really affect sleep quality, checked against CDC, NIH and FDA sources — including the six-hour caffeine rule and the claims that do not hold up.

Almost every article about nutrition for better sleep is built the same way: a list of foods said to contain sleep-promoting compounds, and a promise that eating them in the evening will help. Tart cherry juice. Kiwifruit. Warm milk. Bananas. Magnesium.

We went looking for the evidence behind each of those, in federal health sources and the reviews they cite. Most of it is not there. What is there is a much shorter, much more reliable list — and it is mostly about what to remove from your evening rather than what to add.

Evening table setting with a light meal before bedtime
The evidence here is mostly subtractive: what leaves the evening matters more than what enters it.

Start with the number that matters

The CDC’s recommendation for adults is “at least 7 hours each day.” In 2024, per the National Center for Health Statistics, “30.5% of adults slept less than 7 hours on average in a 24-hour period.”

That shortfall is not a small inconvenience. The National Heart, Lung, and Blood Institute describes sleep as helping “support a healthy balance of the hormones that make you feel hungry (ghrelin) or full (leptin)” — and adds that “when you don’t get enough sleep, your level of ghrelin goes up and your level of leptin goes down. This makes you feel hungrier than when you’re well-rested.”

NHLBI also notes that sleep deficiency “results in a higher-than-normal blood sugar level, which may raise your risk of diabetes,” and that “adults who regularly get 7-8 hours of sleep a night have a lower risk of obesity and high blood pressure.”

So the relationship runs both ways. That is worth holding onto: if your eating has felt harder to control lately, sleep is a plausible upstream cause, not just a downstream symptom.

Caffeine: the one with the clearest numbers

This is the best-evidenced item in the whole subject, and the numbers are more inconvenient than most people expect.

Caffeine’s persistence is the issue. The NIH-hosted clinical reference StatPearls puts it plainly: “the half-life of caffeine in the average adult is approximately 5 hours.” Half of an afternoon dose is still in circulation five hours later. NHLBI’s sleep guidance goes further: “the effects of caffeine can last up to 8 hours,” so “a cup of coffee in the late afternoon can make it hard for you to fall asleep at night.”

A randomized, double-blind, placebo-controlled crossover trial tested this directly, giving 400 mg of caffeine at bedtime, 3 hours before bed, and 6 hours before bed. The result: “a moderate dose of caffeine at bedtime, 3 hours prior to bedtime, or 6 hours prior to bedtime each have significant effects on sleep disturbance relative to placebo.” The authors concluded their data “provides empirical support for sleep hygiene recommendations to refrain from substantial caffeine use for a minimum of 6 hours prior to bedtime.”

Six hours before an 11pm bedtime is 5pm. That is the actionable number.

How much are you actually getting?

The FDA’s per-12-fluid-ounce figures vary more than most people assume:

Drink (12 fl oz) Caffeine
Coffee, regular brewed non-specialty 113–247 mg
Energy drink 41–246 mg
Black tea 71 mg
Green tea 37 mg
Caffeinated soft drink 23–83 mg

For daily total, FDA cites “400 milligrams a day — that’s about two to three 12-fluid-ounce cups of coffee — as an amount not generally associated with negative effects” in most healthy adults. But it also stresses that “there is wide variation in both how sensitive people are to the effects of caffeine and how fast they eliminate it from the body.” Your cutoff time is not necessarily anyone else’s.

Green tea is not a free pass. At 37 mg per 12 oz it is roughly a third of a weak coffee — small, but not zero, and the 6-hour window still applies if you are sensitive. Herbal infusions (which are not tea) contain none.

If caffeine is part of your training routine rather than just your morning, we cover the performance side separately in caffeine and athletic performance and caffeine’s effect on metabolism.

Alcohol: falls asleep faster, sleeps worse

The nightcap is the most persistent piece of folk sleep advice, and it does do what people think — for about three hours.

The National Institute on Alcohol Abuse and Alcoholism states: “People may fall asleep faster after drinking alcohol, but their sleep is fragmented, and they tend to wake up earlier.”

A systematic review of alcohol’s effects on normal sleep describes the shape of it precisely. “At all dosages, alcohol causes a reduction in sleep onset latency, a more consolidated first half sleep and an increase in sleep disruption in the second half of sleep.” On REM specifically: “the onset of the first REM sleep period is significantly delayed at all doses and appears to be the most recognizable effect of alcohol on REM sleep,” while total-night REM “is decreased in the majority of studies at moderate and high doses with no clear trend apparent at low doses.”

So the accurate version is: alcohol reliably delays REM onset and wrecks the second half of the night. Whether it suppresses REM overall depends on how much you drank. Federal sleep guidance is simply “avoid alcoholic drinks before bed” (NHLBI) and “avoiding large meals and alcohol before bedtime” (CDC).

For what alcohol does to training specifically, see alcohol and athletic performance.

Coffee cup and wine glass on a table in the evening
Caffeine and alcohol are the two dietary factors with the clearest sleep evidence — both negative.

Meal timing: the one dietary lever with consistent official backing

Four independent federal sources say the same thing, with slightly different windows:

  • NHLBI: “Avoid heavy or large meals within a few hours of bedtime. (Having a light snack is okay.)”
  • National Institute on Aging: “Avoid eating large meals within two to three hours of your bedtime and avoid drinking large amounts of liquid late in the day.”
  • MedlinePlus: “Avoiding eating heavy meals at least 2 hours before going to sleep.”
  • CDC: “Avoiding large meals and alcohol before bedtime.”

Note what none of them say: that a particular food eaten before bed improves sleep. The guidance is consistently about size and proximity, not composition. A two-to-three hour gap between a full meal and lights out is the recommendation, and a light snack inside that window is explicitly permitted.

The claims that do not hold up

This is the part of the subject where most articles go wrong, so we are going to be specific about each one.

Tart cherry juice

No NIH, CDC, FDA or NCCIH page mentions tart cherry for sleep. The pilot study the claim rests on had 15 participants and tested a single commercial product — and reported that “no such improvements were observed for sleep latency, total sleep time, or sleep efficiency compared to placebo,” with effect sizes that were “moderate and in some cases negligible.” That is a much weaker result than the marketing built on it.

Kiwifruit

The trial behind this used “a free-living, self-controlled diet design” with “twenty-four subjects (2 males, 22 females)” and no control or placebo group. Without a control arm, placebo effect and regression to the mean are entirely uncontrolled. The authors themselves concluded only that further investigation may be warranted.

Magnesium

This one is worth stating carefully, because magnesium is a genuinely important mineral. The NIH Office of Dietary Supplements fact sheet for health professionals covers magnesium and health under four headings: hypertension and cardiovascular disease, type 2 diabetes, osteoporosis, and migraine. Sleep is not among them — the fact sheet does not discuss sleep at all.

NIH’s dedicated review of complementary approaches to sleep did look at the magnesium trials, and its verdict was that “the reviewers said the studies were of low quality and inadequate for making well-informed decisions on using magnesium.”

Get magnesium because you need magnesium — the RDA is 400–420 mg for adult men and 310–320 mg for women, and ODS lists roasted pumpkin seeds at 156 mg per ounce, dry-roasted almonds at 80 mg, boiled spinach at 78 mg per half cup, and cooked black beans at 60 mg per half cup. Just do not expect it to be a sleep aid. Note also that supplemental magnesium has an upper limit of 350 mg/day for adults, above which “high doses of magnesium from dietary supplements or medications often result in diarrhea that can be accompanied by nausea and abdominal cramping.”

Warm milk, bananas and the tryptophan story

The biochemistry is real. MedlinePlus confirms that “the body uses tryptophan to help make melatonin and serotonin,” and that “melatonin helps regulate the sleep-wake cycle.”

The leap from that to “eat tryptophan-rich food, sleep better” is where it breaks. No federal source makes a food-based tryptophan sleep claim. NIH’s only statement on tryptophan and insomnia concerns supplements, and it reads: “There is very limited data on their effects on insomnia.”

As for bananas as a magnesium source — ODS puts a medium banana at 32 mg, under a tenth of an adult RDA.

Melatonin supplements

Not a food, but it comes up in every conversation about this, so: NCCIH states that “there’s not enough strong evidence on the effectiveness or safety of melatonin supplementation for chronic insomnia to recommend its use,” and that “information on the long-term safety of supplementing with melatonin is lacking.”

There is also a quality problem. In one analysis, “for most of the supplements, the amount of melatonin in the product didn’t match what was listed on the product label. Also, 26 percent of the supplements contained serotonin.” A 2023 look at melatonin gummies found levels “ranging from 74 to 347 percent of the labeled quantity.” This is possible because, as FDA states, “FDA does not have the authority to approve dietary supplements before they are marketed.”

If you have children in the house: NCCIH, citing CDC, reports that between 2019 and 2022, “11,000 emergency department visits were for unsupervised melatonin ingestion by children 5 years and younger.” Melatonin gummies are not candy and should not be stored as if they were.

Valerian and chamomile

ODS on valerian: “evidence from clinical studies of the efficacy of valerian in treating sleep disorders such as insomnia is inconclusive.” NCCIH on chamomile: “although chamomile has traditionally been used for insomnia, often in the form of a tea, there is no conclusive evidence from clinical trials showing whether it is helpful.”

That does not mean a cup of chamomile before bed is pointless — a warm, caffeine-free drink as part of a wind-down routine is fine. It means the herb is not doing the work.

Small evening snack plate
NHLBI permits a light snack inside the pre-bed window; it is the large meal that causes trouble.

What to actually do

Stripping out everything unsupported leaves a short list. Every item below traces to a federal health source.

Do this Why
No substantial caffeine within 6 hours of bed Controlled trial found significant sleep disturbance at 6 hours; caffeine’s half-life is about 5 hours
Know your caffeine total FDA’s reference point is 400 mg/day for healthy adults, with wide individual variation
Skip the nightcap Alcohol fragments the second half of the night and delays REM onset at all doses
Finish large meals 2–3 hours before bed Consistent guidance from NHLBI, NIA, MedlinePlus and CDC
A light snack in that window is fine NHLBI explicitly permits it
Limit large volumes of liquid late NIA guidance; reduces night waking
Aim for 7+ hours CDC recommendation for adults

The CDC’s broader sleep-hygiene list adds the non-dietary half: “going to bed and getting up at the same time every day,” “keeping your bedroom quiet, relaxing, and at a cool temperature,” “turning off electronic devices at least 30 minutes before bedtime,” and “exercising regularly and maintaining a healthy diet.”

When food is not the problem. Persistent trouble sleeping despite a sensible evening routine is worth raising with a clinician rather than solving in the supplement aisle. Chronic insomnia is a diagnosable condition with established treatments, and none of them are a beverage.

FAQs

What foods help you sleep?

No food has been shown by an authoritative source to improve sleep. The evidence in this area is about what to avoid — caffeine within six hours of bed, alcohol, and large meals within two to three hours — not about foods that induce sleep.

How late can I drink coffee?

The controlled evidence supports stopping substantial caffeine at least six hours before bed. Because clearance rates vary widely between people, some will need a longer margin; if you are unsure, move your cutoff earlier for a week and see whether anything changes.

Does tart cherry juice work for sleep?

Not on the available evidence. The pilot study behind the claim found no improvement in sleep latency, total sleep time or sleep efficiency versus placebo, and no federal health source mentions tart cherry for sleep.

Should I take magnesium for sleep?

The NIH fact sheet on magnesium does not cover sleep, and NIH’s review of the sleep trials called them low quality and inadequate for decision-making. Meeting your magnesium RDA through food is worthwhile for other reasons; treating it as a sleep aid is not supported.

Is a nightcap really that bad?

It works in the direction people notice — falling asleep faster — and against them for the rest of the night. Sleep becomes fragmented, waking comes earlier, and REM onset is delayed at every dose studied.

Can I eat before bed at all?

Yes. NHLBI’s guidance is to avoid heavy or large meals within a few hours of bedtime and explicitly adds that a light snack is okay. The concern is meal size and timing, not eating as such.

Does poor sleep make me eat more?

NHLBI describes exactly that mechanism: short sleep raises ghrelin and lowers leptin, which “makes you feel hungrier than when you’re well-rested.” If appetite control has been unusually hard, sleep is worth examining first.

This content is for educational purposes only and is not medical advice. Always consult a qualified healthcare professional for personalised guidance.

Share this guide
On this page