Eating Habits That Can Improve Your Sleep

Certain foods and dietary patterns may help you get better rest, experts say.

Apr. 7, 2026 at 12:55pm

A ghostly, translucent X-ray image of a human brain, its neural pathways and structures glowing in shades of blue and green against a dark background, conveying the scientific and holistic nature of the story's insights on how diet can impact sleep.An X-ray view of the brain's intricate inner workings offers a glimpse into the complex relationship between nutrition and sleep.San Diego Today

While there are no magic fixes, experts say that consistency with certain diets, particularly those built around lean proteins, fruits and vegetables, whole grains, nuts and seeds, and dairy, can have a positive effect on sleep quality and duration over time. Foods containing melatonin and tryptophan may also help, but the overall dietary pattern is more important than any single food.

Why it matters

Getting enough quality sleep is crucial for physical and mental health, but many people struggle with insomnia and poor sleep. Understanding how diet and eating habits can impact sleep could help people make lifestyle changes to improve their rest.

The details

Certain foods contain melatonin and tryptophan, which can help regulate the body's sleep-wake cycles. Fruits, vegetables, whole grains, lean proteins, and dairy are all associated with better sleep when consumed consistently as part of an overall healthy diet. However, eating too close to bedtime, consuming too much caffeine or alcohol, and eating ultra-processed foods can all negatively impact sleep.

  • Eating at least 3 hours before bedtime can help align the body's circadian rhythms and improve sleep quality.

The players

Erica Jansen

Assistant professor of nutritional sciences at the University of Michigan School of Public Health.

Marie-Pierre St-Onge

Professor of nutritional medicine and director of the Center of Excellence for Sleep and Circadian Research at Columbia University.

Phyllis Zee

Professor of neurology and director of the Center for Circadian and Sleep Medicine at Northwestern University.

Got photos? Submit your photos here. ›

What they’re saying

“It's more beneficial to focus on whole dietary pattern changes rather than trying to focus on one magic food.”

— Erica Jansen, Assistant professor of nutritional sciences

“Perhaps more than what you eat, when you eat relative to sleep may be as important. Eating close to bedtime can disrupt sleep, increase reflux and may have adverse effects on cardiometabolic function.”

— Phyllis Zee, Professor of neurology

The takeaway

Making consistent, healthy changes to your overall diet, such as eating more fruits, vegetables, whole grains, and lean proteins, while avoiding late-night eating, can help improve your sleep quality over time. The specific nutrients in certain foods may play a role, but the broader dietary pattern is most important.