This article is for informational purposes only and does not constitute medical advice. If you have a diagnosed sleep disorder or a medical condition affected by diet, talk to your doctor or a registered dietitian before making changes.
How Food Affects Sleep
Most sleep advice focuses on what happens in the hour before bed — dim the lights, put the phone away, get into a cool room. All of that matters. But there’s another lever that’s easy to overlook: what’s happening in your stomach while you’re trying to drift off.
Food affects sleep in a few different ways. Some nutrients are direct building blocks for the chemicals your body uses to relax and fall asleep — magnesium, tryptophan, and the hormones they help produce. Other foods affect sleep more indirectly, through blood sugar swings, digestion, or how much you need to get up in the night. And then there’s timing: eating a heavy meal right before bed asks your digestive system to work overtime exactly when it should be winding down.
None of this means food is a magic fix for poor sleep — if you’re dealing with chronic insomnia, the foundations covered in our sleep hygiene guide matter far more. But getting your evening eating right removes one more obstacle between you and a good night’s rest, and for a lot of people, it’s a surprisingly easy win.
Nutrients That Support Better Sleep
A handful of nutrients show up again and again in sleep research. You don’t need to obsess over hitting exact numbers, but knowing which foods contain them helps explain why certain bedtime snacks have such a good reputation.
Magnesium and Relaxation
Magnesium plays a role in regulating the nervous system, and low magnesium intake has been linked to poorer sleep quality and more nighttime waking. It’s involved in switching off the “alert” parts of your nervous system and supporting the deeper stages of sleep.
Good sources include almonds, cashews, pumpkin seeds, spinach, and whole grains. A small handful of almonds or pumpkin seeds in the evening is an easy way to nudge your intake up without overloading on calories before bed.
Protein and Tryptophan
Tryptophan is an amino acid your body uses to produce serotonin, which in turn is converted into melatonin — the hormone most directly involved in signalling that it’s time to sleep. Turkey, chicken, eggs, dairy, and tofu all contain tryptophan.
On its own, tryptophan from food has a fairly modest effect — it’s competing with other amino acids to get into the brain. But pairing a protein source with carbohydrates (think yoghurt with a bit of granola, or toast with turkey) seems to help tryptophan along, which is part of why “warm milk and toast” style bedtime snacks have stuck around for generations.
Best Foods to Eat Before Bed
The general rule for bedtime eating is small, balanced, and not too rich. You’re not trying to fill up — you’re taking the edge off hunger so it doesn’t wake you, while giving your body a few sleep-supportive nutrients along the way.
Best Small Snacks for Sleep
A few reliable options if you’re peckish an hour or two before bed:
- A small bowl of plain yoghurt with a few berries — protein plus a touch of natural sugar without a big spike.
- A handful of almonds or walnuts — magnesium, healthy fats, and enough substance to curb hunger.
- A banana — a source of magnesium and vitamin B6, both involved in melatonin production.
- Kiwi fruit — some research has linked eating one or two kiwis before bed with falling asleep faster and sleeping longer, likely thanks to their antioxidant and serotonin content.
- A cup of chamomile tea — caffeine-free, and the warm ritual itself can be as calming as anything in the cup.
- Dinner (2–3 hours before bed): a moderate portion of lean protein (fish, chicken, tofu, or legumes), vegetables, and a modest serving of whole grains or potatoes. Keep it light on fried or very rich sauces.
- Optional evening snack (1 hour before bed): choose one — a kiwi, a small bowl of yoghurt with berries, a banana with a few almonds, or wholegrain toast with a little turkey or nut butter.
- Drink: a cup of chamomile or other caffeine-free herbal tea as part of your wind-down routine — see our sleep hygiene guide for how to build this into a full evening routine.
- Avoid: caffeine after early afternoon, alcohol close to bedtime, and large or spicy meals within a couple of hours of sleep.
Best Light Meals for Sleep
If dinner itself is close to bedtime, lighter is generally better. Think grilled fish or chicken with vegetables and a modest portion of rice or potatoes, a vegetable soup with some bread, or an omelette with salad. The goal is something your stomach can comfortably process in an hour or two — rich, fried, or very large meals tend to sit heavily and can contribute to discomfort, reflux, and restless sleep.
If you tend to eat dinner late because of work or family schedules, it’s worth experimenting with shifting it 30–60 minutes earlier where possible, or making the evening meal a bit lighter and saving anything heavier for lunch.
Foods and Drinks That Can Hurt Sleep
Just as some foods support sleep, others tend to work against it — usually through stimulation, blood sugar swings, or simply sitting too heavily in your stomach.
Caffeine and Late-Energy Drinks
Caffeine’s effects last far longer than most people assume — its half-life is roughly five to six hours, meaning a coffee at 4pm can still have a meaningful amount in your system at 10pm. Energy drinks, some sodas, and even chocolate contain enough caffeine to matter if you’re sensitive. If you struggle to fall asleep, an afternoon cut-off (many people find early-to-mid afternoon works well) is one of the highest-value changes you can make.
Alcohol and Sleep Quality
Alcohol can make you feel sleepy initially, but it fragments sleep later in the night — it’s metabolised over a few hours, and as levels drop, sleep becomes lighter and more disrupted, often with more waking in the second half of the night. A nightcap might help you fall asleep faster, but it tends to come at the cost of sleep quality overall.
Spicy foods, very fatty or fried meals, and large portions late at night round out the list — not because any single instance will ruin your sleep, but because they increase the odds of discomfort, reflux, or a stomach that’s still working when it should be resting.
Frequently Asked Questions
What foods help you sleep better?
Foods containing magnesium (almonds, pumpkin seeds, spinach), tryptophan (turkey, dairy, eggs), and natural compounds linked to sleep (kiwi, tart cherries, chamomile tea) are most commonly associated with better sleep. The effect is generally modest and works best alongside good sleep habits overall.
What should I eat before bed to sleep?
A small, balanced snack roughly one to two hours before bed works well for most people — think yoghurt with berries, a banana, a small handful of nuts, or a kiwi with a cup of chamomile tea. Avoid large meals, very spicy or fatty food, and anything heavy on caffeine or sugar.
Is milk good for sleep?
Warm milk contains a small amount of tryptophan and the ritual of a warm drink before bed can be genuinely calming. The effect from the milk itself is modest, but as part of a consistent wind-down routine, it can still be a helpful habit.
Does chocolate affect sleep?
Yes — chocolate, especially dark chocolate, contains caffeine and a related stimulant called theobromine. The amounts are smaller than in coffee, but if you’re sensitive to caffeine or eating a larger portion, an evening chocolate habit could contribute to lighter or delayed sleep.
How late should I eat before bed?
Aim to finish your main meal at least two to three hours before bed where your schedule allows. A small, light snack closer to bedtime is generally fine for most people and can even help prevent waking up hungry.
Are there natural sleep-aid foods?
Kiwi, tart cherries (and tart cherry juice), chamomile tea, almonds, and walnuts are the foods most often discussed in sleep research as natural aids. They’re not sedatives, but they provide nutrients and compounds that support your body’s own sleep processes — most useful as part of a broader routine rather than a standalone fix.
Simple “Sleep-Friendly” Evening Meal Plan
If you want a starting template rather than a list of individual foods, here’s a simple structure you can adapt:
Food is just one piece of the sleep puzzle. If you’re still struggling to drift off even after adjusting your evening eating, our guide on how to fall asleep faster covers breathing techniques, bedroom setup, and mindset strategies that work alongside good nutrition — and our complete guide to sleep ties everything together.
Related Reading:
Sleep: The Complete Guide to Better Rest, Recovery, and Health
How to Fall Asleep Faster
Sleep Hygiene: Build Better Sleep Habits
If you regularly struggle with sleep despite a good diet and routine, or if poor sleep is affecting your daily life, it’s worth speaking with your GP — persistent sleep problems can sometimes be a sign of an underlying condition that’s worth checking.