Our bodies produce a hormone called melatonin, which helps regulate our sleep-wake cycles. When it starts to get dark in the evening, the brain releases melatonin, signalling that it’s time to sleep.
Research shows that we can also get melatonin from certain foods, including:
Fruits and vegetables (such as bananas, pineapples and oranges, tomatoes and tart cherries)Nuts (such as walnuts)SeedsFishEggsMilk
In a 2021 study of more than 1000 young adults, Jansen and her colleagues found that women who upped their fruit and vegetable intake over a period of three months had improvements in insomnia symptoms, the time it took them to fall asleep and sleep quality compared with women who did not change their diet.
Another study concluded that a greater intake in fruits and vegetables – a five-cup increase from no intake – was associated with 16% better sleep quality in men and women.
Tart cherries, in particular, have been studied for their sleep-promotion potential.
Although placebo-controlled randomised trials have been small (and often conducted with funds or product donations from manufacturers of tart cherry juice), some studies suggest tart cherry juice may have “modest beneficial effects” and could improve sleep duration and quality.
In addition to melatonin, some foods contain tryptophan, an amino acid that can be converted into melatonin in the body, research shows. Tryptophan is an amino acid that our bodies are unable to create, so we must obtain it directly from foods, said Marie-Pierre St-Onge, a professor of nutritional medicine and director of the Centre of Excellence for Sleep and Circadian Research at Columbia University.
Foods high in tryptophan include:
Turkey (though it’s not higher in tryptophan than many other proteins)ChickenFish (especially salmon, which is rich in omega-3 fatty acids)CheeseEgg whitesNuts and seedsDairy (including fermented dairy such as yoghurt)
In 2024, researchers examined the sleep and food habits of more than 11,000 university students in Spain to see whether the amount of tryptophan they consumed was tied to how well they slept. Students whose self-reported diets contained the lowest amounts of tryptophan were more likely to sleep for shorter periods and have symptoms of insomnia.
Complex carbohydrates rich in fibre, vitamins and minerals such as whole grains, legumes and starchy vegetables help the body absorb tryptophan from foods, and then magnesium, B vitamins and zinc help the body convert it into melatonin, said St-Onge, who is author of the book Eat Better, Sleep Better: 75 Recipes and a 28-Day Meal Plan That Unlock the Food-Sleep Connection.
That’s why plant-rich diets that consistently incorporate these foods are associated with better sleep over time. Earlier this year, St-Onge and her colleagues analysed data from the Women’s Health Initiative Observational Study and found that postmenopausal women who more closely followed the Mediterranean or DASH diets had about a 6 to 8% lower risk of developing insomnia over three years.
Another reason a well-balanced diet may lead to better sleep? It may help correct underlying nutritional deficiencies that can interfere with sleep, such as low iron or vitamin D, Jansen said.
Does it matter what time of day you eat?
While there’s no conclusive evidence that particular foods or beverages consumed only at bedtime promotes better sleep, there is research to the contrary – that eating foods later in the day, especially before going to bed, can make it more difficult to fall and stay asleep.
One study suggested that skipping breakfast and eating dinners late were tied to delayed bedtimes, later wake times and lower sleep efficiency.
Similarly, a 2026 clinical trial found that stopping eating at least three hours before bedtime helped better align the body’s circadian rhythms with sleep, improving nighttime blood pressure, heart rate and blood sugar regulation.
“Perhaps more than what you eat, when you eat relative to sleep may be as important,” said Phyllis Zee, a professor of neurology and director of the Centre for Circadian and Sleep Medicine at Northwestern University, who was senior author of the study. “Eating close to bedtime can disrupt sleep, increase reflux and may have adverse effects on cardiometabolic function.”
Are there foods that interfere with sleep?
Most of us know to avoid overdoing it on the caffeine if we want a good night’s sleep. The stimulant, often found in coffee, tea and chocolate, blocks adenosine in the brain by binding to its receptors. Adenosine is a chemical that builds up throughout the day and makes us feel sleepy at night.
Highly sweetened or sugary drinks have been linked to worse sleep quality, too.
And while a glass of wine may help you fall asleep faster, as the alcohol wears off, it can have a rebound effect that causes you to wake up early and have trouble falling back asleep, research shows.
Certain diets can be problematic, as well.
Ultra-processed foods, including highly refined carbohydrates, saturated fats and sugars, have been linked to worse sleep outcomes and chronic insomnia.
Although these types of studies can’t prove cause and effect, when you consume saturated fats, particularly later in the day, it can delay the natural release of melatonin that prepares you for sleep, making it more difficult for you to fall sleep on time, Jansen said.
Also, spicy foods and foods that trigger allergies or sensitivities can lead to indigestion or acid reflux, which can affect sleep quality, she said.
Even though your dietary patterns are more likely to influence your sleep, that doesn’t mean drinking a cup of decaffeinated herbal tea or warm milk in the evening has no benefit. The process of preparing the beverage, holding the warm cup in your hands and sipping from it can be soothing, Jansen said.
“There is something about having a ritual, a bedtime ritual, that’s helpful for going to sleep,” she said.