Eat Your Way to Sleep
Most people troubleshoot sleep by changing their bedtime, dimming their phone screen, or trying a white noise app.
Those things help, but what's on your plate throughout the day plays a surprisingly direct role in how well you sleep at night. Three nutrients sit at the center of sleep science: tryptophan, melatonin, and magnesium.
These compounds work together to regulate your body's sleep-wake cycle, and a growing body of research confirms that consistently eating foods rich in them makes a measurable difference to sleep quality and duration.

Tryptophan: The Building Block Your Brain Needs

Tryptophan is an essential amino acid the body can't produce on its own — it has to come from food. Once consumed, it converts to serotonin, which then synthesizes into melatonin, the hormone that signals your body it's time to sleep. Foods high in tryptophan include turkey, chicken, fish, eggs, edamame, tofu, pumpkin seeds, and quinoa. The timing matters too: pairing tryptophan-rich foods with complex carbohydrates like brown rice or whole grain bread helps shuttle tryptophan across the blood-brain barrier more efficiently, making the conversion to melatonin faster and more effective. A simple dinner of grilled fish with brown rice covers both bases.

Tart Cherries and Nuts: Natural Melatonin Sources

Tart cherries — particularly Montmorency varieties — are one of the few foods that contain melatonin directly. Studies using tart cherry juice found that participants spent less time napping, reported higher sleep efficiency scores, and slept longer compared to those who didn't consume it. A small glass of unsweetened tart cherry juice in the evening is a practical way to tap into this. Almonds and pistachios also contain melatonin alongside magnesium and vitamin B, making them especially useful as an evening snack. Walnuts are another solid option — they contain both melatonin and omega-3 fatty acids linked to better sleep quality.

Magnesium Foods: Calm the Nervous System

Magnesium promotes sleep in two specific ways: it binds to GABA receptors in the brain, which calm nervous system activity, and it regulates melatonin production. When magnesium levels are low, both of these processes become less effective. Spinach is one of the richest dietary sources — one cup of boiled spinach covers about 37% of the daily magnesium requirement. Avocados, bananas, sweet potatoes, and pumpkin seeds are also strong sources. Getting magnesium consistently through food tends to be more reliable than supplements for improving sleep, and the fiber and micronutrients in these foods come as a bonus.

Dairy and Chamomile Tea: Old Habits With Real Science

Warm milk before bed isn't just an old wives' tale. Dairy products are notably rich in tryptophan, and milk also contains small amounts of melatonin — with levels varying depending on when the cows were milked. Cottage cheese and Greek yogurt are particularly high in tryptophan, making them practical late-evening snacks that support sleep without being heavy to digest. Chamomile tea rounds things out: multiple clinical trials confirm it improves sleep quality and reduces anxiety, likely through its apigenin content, which binds to receptors in the brain that promote relaxation. Caffeine-free and easy to make, it's one of the most practical pre-sleep habits you can build.

What to Avoid in the Evening

The flip side matters just as much. Caffeine consumed within six hours of bedtime interferes with sleep onset even when you don't feel alert. High-fat and heavily spiced foods slow digestion and raise body temperature, both of which work against the natural cooling process the body needs to fall asleep. Sugary snacks cause blood sugar fluctuations that can disrupt sleep mid-cycle. The overall dietary pattern matters more than any single food — a diet built around whole, nutrient-dense foods throughout the day creates the best conditions for restful sleep, rather than relying on one specific item eaten right before bed.