Most sleep advice involves cutting things out. Like less caffeine, less screen time and less stress. But a new study is making a case for adding something instead, specifically a small handful of walnuts eaten in the evening, and the science behind it is more solid than you might expect.
What the research actually found
Researchers from the University of Barcelona ran a randomized controlled trial published in the journal Food & Function, and the results were clear enough to get people's attention. The study found that eating 40 grams of walnuts daily for eight weeks led to significant improvements in sleep quality and melatonin production.
That 40 grams works out to roughly a handful, about 10 to 14 walnut halves. The study involved 76 healthy young adults between the ages of 20 and 28, who completed both walnut and control phases in a crossover design.
The walnut intervention shortened the time it took participants to fall asleep, improved overall sleep quality scores, and reduced self-reported daytime sleepiness compared to the control, nut-free period.
Does the timing actually matter?
This is where the findings get a little counterintuitive. You'd assume that eating walnuts right before bed would be the key, but the researchers aren't so sure. Dr. María Fernanda Zerón-Rugerio, co-leader of the study, said "while the observed effects in this study came following walnut consumption at dinner, we believe that the daily intake, rather than the timing, led to the sleep-supportive benefits." In other words, it's less about when you eat them and more about eating them consistently. The melatonin boost appears to build over time, not spike immediately after you eat. Melatonin levels were significantly increased in participants' evening urine samples after four weeks of consuming walnuts, as compared to the control period. Four weeks. That's a slow, steady accumulation, not an overnight fix.
The rich nutritional profile of walnuts
It's not random that walnuts specifically keep showing up in sleep research. They have an unusual nutritional profile that happens to line up almost perfectly with what the body needs to produce melatonin, the hormone that tells your brain it's time to wind down.
Walnuts contain a unique combination of sleep-supportive nutrients, including tryptophan, magnesium, and B vitamins including vitamin B5 and B6. And then there's the plant-based melatonin in the walnut itself, which adds directly to the pool.
The bigger picture on sleep
So no, walnuts aren't a cure for chronic insomnia. But as a simple, low-effort habit with no side effects and a solid nutritional rationale behind it, adding a small handful to your evening routine seems like a genuinely reasonable thing to try. The worst that happens is you eat some walnuts. The best thing that happens is you sleep a little better. That's not a bad trade.



