Although some late-night snacks may aid sleep, it's probably more important to avoid unhealthy foods before bedtime.
The essential amino acid tryptophan, found in many foods including eggs, bananas, dates, milk, peanuts, and poultry, is often touted as a sleep-inducing ingredient.
Consuming carbohydrates at the same time as tryptophan-rich foods is thought to boost the amino acid’s uptake, so simple carb-based meals such as a chicken sandwich, peanut butter on wholegrain toast, a small bowl of porridge or wholegrain cereal with milk may be just the ticket.
But there is limited scientific evidence that tryptophan treats actually have much of an effect on sleep.
A recent study of over 11,000 Spanish university students suggested those with lower tryptophan consumption had poorer sleep quality, however, it’s important to note that these results were self-reported.
Tryptophan is a precursor to the neurotransmitter serotonin, which is involved in a range of physiological processes, including sleep.
Serotonin, in turn, is a building block for the hormone melatonin, which plays a crucial role in regulating our sleep-wake cycle. The gut, our largest endocrine organ, makes most of the body’s serotonin.
The gut is also thought to be associated with sleep quality via the gut-brain axis, a complex communication system between intestinal microbes and brain cells.
There is growing evidence that a fibre-rich diet can help to improve sleep because of this axis. Studies have correlated higher fibre intake with longer periods of deep sleep and fewer nighttime wake-ups.
In a study of 147 healthy adults, researchers at Vrije University in Amsterdam reported that eating a high-fibre diet improved sleep compared with a control group.

The Gut Health Enhancement by Eating Favorable Food (GEEF) study is now expanding to include more than 10,000 participants.
High-fibre foods help to stabilise blood glucose levels during the night.
But the researchers think the improved sleep mainly results from microbes fermenting the fibre to produce short-chain fatty acids (SCFAs) such as butyrate, which can modulate serotonin synthesis.
Some animal studies have also found lower intestinal production of SCFAs to be associated with shorter sleep time.
Sleep and the gut microbiome are linked in an eternal loop. Poor sleep can disrupt the gut microbiome, which can then lead to further negative sleep effects.
In another interconnected loop, disturbed sleep tends to boost our cravings for energy-rich foods, such as those heavy with fat and carbohydrates.
But a high intake of these ultra-processed foods – with high sugar levels and low levels of fibre – in turn appears to lead to poorer sleep quality.
For example, a study of students in Saudi Arabia reported a “significant association” between their sugar intake and getting poor sleep.
The best thing you can do for your sleep? Stick to a healthy diet, and if you fancy a bedtime bite, try a tryptophan-rich food.
Ideally, pair it with a source of fibre or complex carbohydrates – such as oats, wholegrain cereal or wholegrain bread – to help stabilise your blood sugar levels and support overnight gut activity.
Alongside avoiding ultra-processed foods high in fat and carbohydrates, try to watch out for alcohol, sugar and caffeine. That means no espresso martinis right before bed.
This article is an answer to the question (asked by Skye Davies, via email) 'What's the best food to eat before bedtime?'
To submit your questions, email us at questions@sciencefocus.com, or message our Facebook, X, or Instagram pages (don't forget to include your name and location).
Check out our ultimate fun facts page for more mind-blowing science
Read more:

