What Foods Help You Sleep Better at Night?

Several foods can genuinely improve your sleep, and they work through a handful of well-understood biological pathways. The most effective options are rich in tryptophan, melatonin, magnesium, or omega-3 fatty acids, all of which play direct roles in helping your brain wind down and stay asleep through the night.

How Food Actually Affects Sleep

The connection between your dinner plate and your sleep quality comes down to brain chemistry. Your brain needs tryptophan, an amino acid found in many protein-rich foods, to produce serotonin and melatonin. Melatonin is the hormone that signals your body it’s time to sleep, and serotonin is the precursor your brain uses to make it.

Here’s where it gets interesting: tryptophan competes with other amino acids to get into your brain. When you eat carbohydrates, your body releases insulin, which causes muscles to absorb most of those competing amino acids from the bloodstream. Tryptophan, however, binds to a blood protein called albumin and stays behind. With the competition cleared out, more tryptophan enters the brain, where it gets converted into serotonin and then melatonin. This is why a meal combining protein and complex carbohydrates tends to be more sleep-friendly than protein alone.

Kiwifruit

Kiwifruit is one of the most studied sleep-promoting foods, and the results are striking. In a trial published in the Asia Pacific Journal of Clinical Nutrition, adults who ate two kiwis one hour before bed every night for four weeks fell asleep 35% faster and slept 13% longer. Their time spent awake in the middle of the night dropped by nearly 29%. Objective measurements from wrist-worn sleep trackers confirmed the results, showing a 17% increase in total sleep time.

In practical terms, participants went from taking about 34 minutes to fall asleep down to 20 minutes, and their total sleep increased from roughly six hours to six and a half hours per night. Kiwis are rich in serotonin and antioxidants, both of which likely contribute to these effects.

Tart Cherry Juice

Tart cherries are one of the few food sources of melatonin. Most research uses tart cherry juice concentrate, not sweet cherries from the grocery store. In a seven-day trial, participants who drank tart cherry juice had significantly elevated melatonin levels along with measurable improvements in sleep duration and quality compared to a placebo group.

The typical amount used in studies is two 8-ounce glasses per day, one in the morning and one in the evening. If you try this, look for 100% tart cherry juice or concentrate rather than sweetened cherry juice blends, since added sugar can work against you at bedtime.

Fatty Fish

Salmon, mackerel, sardines, and other fatty fish provide a combination of omega-3 fatty acids and vitamin D that supports sleep. Research from the University of Pennsylvania found that people who ate fish regularly experienced fewer sleep disturbances and better overall sleep quality. The omega-3s in fish help regulate serotonin, which ties back to melatonin production, while vitamin D plays its own role in sleep regulation. Aiming for two or three servings of fatty fish per week is enough to see benefits.

Nuts, Especially Pistachios and Walnuts

Most nuts contain small amounts of melatonin, typically between 0.1 and 3.3 nanograms per gram. Pistachios are the standout, with some varieties containing dramatically higher concentrations. One analysis of Iranian pistachios found 230,000 nanograms of melatonin per gram, thousands of times more than other plant foods. Even more conservatively measured pistachios contain about 69 nanograms per gram, still far above most foods.

Walnuts also contain melatonin along with healthy fats that support serotonin production. A small handful of either nut as an evening snack gives you melatonin plus magnesium and tryptophan in one package.

Magnesium-Rich Foods

Magnesium plays a surprisingly broad role in sleep. It helps regulate your body’s internal clock, reduces nighttime wakefulness, and supports the production of melatonin while lowering cortisol, the stress hormone that keeps you alert. Research following Chinese adults over five years found that adequate magnesium intake was associated with fewer sleep disorder symptoms, including less daytime sleepiness.

Good food sources include pumpkin seeds, spinach, dark chocolate, almonds, black beans, and avocados. Many people don’t get enough magnesium from their diet alone, so deliberately including these foods at dinner can make a real difference. Pumpkin seeds are particularly efficient: just one ounce provides nearly half the daily recommended intake.

Complex Carbohydrates With Protein

Because of the tryptophan-insulin mechanism described above, pairing complex carbohydrates with a tryptophan source is one of the most reliable dietary strategies for better sleep. Think whole grain toast with turkey, oatmeal with milk, or brown rice with salmon. The carbohydrates trigger the insulin response that clears the path for tryptophan to reach your brain, and the protein supplies the tryptophan itself.

The key word here is “complex.” Foods with a high glycemic index, like white bread, sugary cereals, or candy, cause rapid spikes in blood sugar and insulin. A study in the American Journal of Clinical Nutrition found that a high glycemic diet increased the likelihood of insomnia. The blood sugar crash that follows a spike can trigger nighttime awakenings. Whole grains, sweet potatoes, and legumes provide the same insulin benefit without the rollercoaster.

The Mediterranean Diet Pattern

Rather than focusing on single foods, adopting a broader dietary pattern may be the most effective approach. A study of over 1,300 Italian adults found that for each one-point increase in Mediterranean diet adherence, participants were 10% more likely to report adequate sleep quality. Those with the highest adherence scores were 82% more likely to sleep well compared to those with the lowest scores. The Mediterranean diet naturally bundles many of the foods on this list: fatty fish, nuts, vegetables, legumes, and whole grains, while limiting processed foods and added sugar.

This association was strongest among people at a normal weight. In obese participants, the link between Mediterranean diet adherence and sleep quality disappeared, suggesting that overall metabolic health plays a role too.

When to Eat Your Last Meal

What you eat matters, but timing matters too. The Cleveland Clinic recommends finishing your last meal about three hours before bedtime. This window gives your body enough time to digest so that acid reflux and active digestion don’t interfere with sleep, but it’s short enough that you won’t lie in bed hungry. Whether your bedtime is 10 p.m. or midnight, the three-hour gap is the important part, not a specific clock time.

If you do want a small snack closer to bed, keep it light and focused on the sleep-promoting foods above: a few pistachios, a kiwi, or a small bowl of oatmeal with milk. Heavy, fatty, or spicy meals within that three-hour window are the most likely to disrupt your sleep through indigestion or reflux.