Insomnia Diet: Foods That May Help and Foods to Limit
Medical note: This article discusses foods and researched botanicals. It does not claim to prevent, treat, or cure disease. Supplements are not a substitute for food, and studied amounts are not personal prescriptions.
No food reliably switches insomnia off, but what and when you eat and drink can make sleep easier or harder. NHLBI (the NIH heart, lung, and blood institute, which leads NIH sleep education) advises avoiding caffeine, nicotine, and alcohol close to bedtime, eating meals on a regular schedule, avoiding late-night dinners, and limiting drinks before bed. The NHS adds a clear timing rule: no tea, coffee, or alcohol for at least 6 hours before going to bed, and no big meal late at night. For long-term insomnia, NHLBI says cognitive behavioral therapy for insomnia (CBT-I) is usually the first recommended option—diet changes are a supporting habit, not a substitute.
What this insomnia diet guide covers (and what it does not)

This guide is for adults with trouble falling or staying asleep, people who wake too early, and anyone who suspects caffeine, alcohol, or late meals are part of the problem. Anchors: NHLBI — Insomnia: healthy sleep habits and care options, NHLBI — Healthy Sleep Habits, NHS — Insomnia, FDA — How Much Caffeine Is Too Much?, and NCCIH — Sleep Disorders: In Depth.
It does not cover sleep apnoea, narcolepsy, restless legs, or insomnia caused by depression, pain, an overactive thyroid, or menopause—the NHS lists these among conditions that can disrupt sleep and that need a doctor’s assessment. The NHS calls insomnia lasting 3 months or longer “long-term insomnia”; most adults need 7 to 9 hours of sleep.
Evidence snapshot: insomnia diet claims vs public sources
| Claim people hope for | What public sources actually say | Confidence |
|---|---|---|
| “Afternoon coffee doesn’t affect me” | NHLBI: caffeine’s effects can last up to 8 hours, so a late-afternoon cup can make it hard to fall asleep; caffeine is in soda, tea, and chocolate too | Strong |
| “A nightcap helps me sleep” | NHLBI: alcohol can make it easier to fall asleep but makes sleep lighter, so you are more likely to wake during the night | Strong |
| “A big dinner makes me drowsy, so it helps” | NHLBI: avoid heavy or large meals within a few hours of bedtime; a light snack is okay | Moderate |
| “Melatonin is the natural fix for insomnia” | NHLBI: research has not proven melatonin effective for insomnia; NCCIH notes sleep-medicine guidelines found not enough strong evidence to recommend it for chronic insomnia | Low |
| “Magnesium, chamomile, or valerian will knock me out” | NCCIH: magnesium evidence is low quality and conflicting; there is no conclusive evidence for chamomile; valerian results are inconsistent and a 2017 guideline recommended against it for chronic insomnia | Low |
| “Up to 400 mg caffeine is fine for everyone” | FDA: about 400 mg a day is not generally linked with negative effects for most adults, but sensitivity varies widely and too much caffeine can cause insomnia | Moderate; individual |
Foods and habits that may help with insomnia
“May help” here means habits that support your body clock and remove common sleep disruptors.
- – Regular meal times: NHLBI advises eating meals on a regular schedule. Steady breakfast, lunch, and dinner times support a consistent daily rhythm.
- – An earlier, moderate dinner: finish your main meal a few hours before bed rather than late at night (NHLBI, NHS).
- – A light snack if hungry: NHLBI says a light snack before bed is okay—think a small yogurt, a piece of fruit, or a few crackers rather than a full plate.
- – Caffeine-free evening drinks: water, caffeine-free herbal infusions, or warm milk. Herbal teas are pleasant wind-down rituals, but NCCIH notes there is no conclusive evidence that chamomile improves insomnia.
- – Fluids front-loaded earlier in the day: NHLBI suggests limiting how much you drink close to bedtime to cut night-time bathroom trips.
- – Daytime activity and daylight: NHLBI recommends regular physical activity at least 5 to 6 hours before bed and time outside each day.
Foods and drinks to limit with insomnia
- – Caffeine after midday: coffee, black and green tea, cola and other caffeinated soft drinks, energy drinks, chocolate. The NHS says no tea or coffee at least 6 hours before bed.
- – Hidden caffeine: FDA notes energy or protein bars, ice cream, chewing gum, dietary supplements, and some over-the-counter medicines can contain added caffeine.
- – Decaf in large amounts if you are very sensitive: FDA says decaf coffee typically still has 2 to 15 mg per 8-ounce cup.
- – Alcohol in the evening (NHLBI, NHS).
- – Nicotine, a stimulant that can interfere with sleep (NHLBI).
- – Large, heavy, or late meals (NHLBI, NHS).
- – Big drinks right before bed (NHLBI).
“Limit” means move earlier, shrink, or swap—not necessarily give up coffee entirely.
Practical plan: an insomnia diet and sleep-routine week
1. Do a caffeine audit
For three days, list every caffeinated item and the time you had it. Use FDA’s typical amounts per 12-ounce drink as a rough guide: brewed coffee 113–247 mg, black tea 71 mg, green tea 37 mg, caffeinated soft drinks 23–83 mg, energy drinks 41–246 mg. Then set a personal cut-off time at least 6 hours before bed (NHS); given NHLBI’s note that effects can last up to 8 hours, many people choose noon or early afternoon. FDA advises cutting back gradually, since withdrawal can be unpleasant.
2. Move dinner earlier
Aim to finish dinner a few hours before bed. If your schedule makes that hard, eat a larger lunch and a lighter evening meal.
3. Plan a light bedtime snack only if you need one
Examples: a small yogurt, a banana or kiwifruit, a few whole-grain crackers with cheese. Keep it small; NHLBI cautions against heavy meals near bedtime.
4. Rethink the evening drink
Replace a nightcap with a caffeine-free herbal infusion or warm milk, and taper fluids in the last hour or two before bed.
5. Shopping list default
Decaf or caffeine-free coffee alternatives for afternoons, caffeine-free herbal teas, milk or fortified plant milk, plain yogurt, bananas, kiwifruit, whole-grain crackers, and ingredients for simple early dinners—fish, chicken, beans, vegetables, rice, and potatoes.
6. Sample day (illustrative)
- – 7:30 a.m.: breakfast with your one or two caffeinated drinks for the day.
- – 12:30 p.m.: lunch; last caffeinated drink by early afternoon.
- – 6:30 p.m.: moderate dinner—baked fish, rice, and vegetables.
- – 9:00 p.m.: optional light snack and a caffeine-free herbal tea.
- – 10:30 p.m.: lights out, keeping the same wake time every day, weekends included (NHLBI).
7. Pair food changes with sleep habits
NHLBI and the NHS also recommend a regular sleep-wake time, a cool, quiet, dark bedroom, a relaxing hour before bed, no screens right before sleep, and avoiding naps (or keeping them under 20 minutes, earlier in the day, per NHLBI). Getting out of bed if you cannot sleep is part of CBT-I stimulus control.
Safety and who should talk to a doctor first

- – See a doctor (NHS) if changing your habits has not helped, you have had trouble sleeping for months, or insomnia is affecting daily life.
- – Melatonin: NCCIH reports a 2023 study found 22 of 25 melatonin gummy products were inaccurately labeled, with amounts from 74 to 347 percent of the label; NHLBI lists daytime sleepiness, headaches, upset stomach, worsening depression, and blood pressure changes as possible side effects. Keep supplements out of children’s reach.
- – Magnesium supplements: NCCIH advises not exceeding 350 mg a day from supplements and medicines for adults unless a clinician recommends it; high intakes can cause diarrhea, nausea, and cramping.
- – Kava has been linked to liver injury that is sometimes serious (NCCIH). L-tryptophan and valerian are not recommended for chronic insomnia by a 2017 sleep-medicine guideline (NCCIH).
- – Chamomile may cause allergic reactions, especially in people allergic to ragweed or related plants (NCCIH).
- – Caffeine: pregnant, trying to conceive, breastfeeding, or taking medicines that affect caffeine sensitivity? FDA recommends asking your provider about limits.
- – OTC sleep aids: the NHS says pharmacy sleep aids may help for 1 to 2 weeks and should not be taken longer; NHLBI notes antihistamine sleep aids can be unsafe for some people.
FAQ
What foods help with insomnia? No food is proven to resolve insomnia. Public sources focus on timing: regular meals, a moderate dinner a few hours before bed, and a light snack if you are hungry, while limiting caffeine, alcohol, and heavy late meals.
When should I stop drinking coffee if I have insomnia? The NHS says at least 6 hours before bed. NHLBI notes caffeine’s effects can last up to 8 hours, so an earlier cut-off may suit sensitive people.
Does alcohol help insomnia? No. NHLBI explains alcohol may help you fall asleep but makes sleep lighter and increases night waking.
Are melatonin or magnesium good for insomnia? NHLBI says research has not proven melatonin effective for insomnia, and NCCIH rates magnesium evidence as low quality and conflicting. Ask your clinician before using either, and ask about CBT-I.
How this differs from related OTCFood topics
This insomnia diet guide covers meal timing, caffeine, and alcohol. For supplement-level detail, see our reviews of magnesium glycinate for sleep, melatonin supplements, and valerian for sleep, plus our ranked overview of foods and botanicals for sleep.
Medical disclaimer
Medical disclaimer: This article is for general education only and is not medical advice or a personal care plan. Ongoing insomnia can be linked to other health conditions or medicines. Talk with your doctor before starting supplements or sleep aids, or if poor sleep lasts for weeks or affects your daily life.