The short answer
No single food is a magic sleeping pill — but your diet genuinely shapes how well you sleep. The pattern that helps: whole, plant-leaning foods that supply sleep-friendly nutrients, eaten earlier rather than right before bed. The pattern that hurts: caffeine, alcohol, sugar, and heavy or spicy meals late in the evening. Get the timing and the overall mix right, and you remove some of the most common, and most fixable, causes of poor sleep.

Foods that tend to help
These aren’t miracle cures, but each has some research behind it, and they share a theme: whole foods carrying nutrients your body uses to wind down — melatonin, tryptophan, and magnesium.
- Kiwi fruit. One small study found that eating two kiwis about an hour before bed helped people with self-reported insomnia fall asleep faster and stay asleep longer.
- Tart cherry juice. Naturally high in melatonin; small studies link it to fewer night-time awakenings.
- Nuts like almonds and walnuts, which provide magnesium and a little melatonin.
- Fatty fish such as salmon, and dairy, both associated with better sleep in dietary studies.
- Whole grains and complex carbs, which release energy slowly and won’t leave you waking from hunger the way refined carbs can.
- Leafy greens and seeds, good sources of the magnesium involved in the body’s “off switch.”
The honest caveat: the studies here are mostly small, so treat these as gentle, low-risk additions to your daily diet rather than guaranteed fixes. The bigger win is the overall pattern, not any one superfood.
Foods and drinks that tend to hurt
This side of the ledger has stronger, more consistent evidence — and it’s where most people can make the biggest difference:
- Caffeine. The obvious one, but it hides in tea, cola, energy drinks, chocolate, and even some decaf. It lingers for hours, so keep it to the first half of the day — here’s when to stop drinking coffee.
- Alcohol. It feels like a sleep aid because it’s sedating, but it’s one of the biggest disruptors of the second half of the night, cutting into restorative REM sleep and causing more awakenings. It’s a leading reason people feel tired even after a full night in bed.
- Sugar and refined carbs. High-sugar diets are linked to lighter, more broken sleep and more night-time wakings; refined carbs at dinner can spike then crash your blood sugar, waking you hungry.
- Heavy, fatty, or fried meals. Slow to digest and linked to less deep, slow-wave sleep — especially rough when eaten late.
- Very spicy foods. They can nudge up your core body temperature, working against the natural cool-down that helps you drift off (the same reason a cool bedroom helps).
When you eat matters as much as what
Even a healthy meal works against you if it’s too big or too late. Your digestion slows during sleep, so a large dinner right before bed sits heavy and can trigger acid reflux that fragments the night. A good rule of thumb is to finish eating two to three hours before bed. If you’re genuinely hungry later, a small, sleep-friendly snack — a few nuts, a little yoghurt, half a banana — beats either going to bed starving or eating a full meal. Folding that into an evening wind-down routine makes it automatic.
The bottom line
Don’t chase a single “sleep food.” Build a diet around whole, mostly plant-based foods, lean on the sleep-friendly options in the evening, go easy on caffeine, alcohol, sugar, and heavy meals as the night approaches, and give your body a couple of hours to digest before bed. It’s one of the most controllable levers you have — and it works hand in hand with a cool, dark room and a steady wake time.
This article is for general information and education and isn’t medical advice. If you have a health condition, reflux, or ongoing sleep problems, please talk to a qualified healthcare professional or dietitian.
Sources: Sleep Foundation — Food and Drink for Better Sleep; Johns Hopkins Medicine — Diet and Sleep; University of Michigan — Best Diet for Healthy Sleep
Comments on “What to Eat — and Avoid — for Better Sleep”