A Dietitian Shares the ‘Big 3’ Nutrients to Include in Your Before-Bed Snack for the Most Restful Sleep

Photo: Stocksy/Jesse Morrow
Sleep deprivation is the touchstone of many a meme, but the effects of falling short on shut-eye are no joke. In Sleep Support, we explore the barriers to a good night's rest—including sleep disorders, chronic conditions, and lifestyle habits—and tap experts for their top tips on paving the path to dreamland. 🌙 💤 Join the slumber party

Is there anything more blissful than a good night’s sleep? Not to mention the incredible impact getting a solid eight hours can have on your health, from your energy levels to your gut microbiome. While there are many factors that can affect sleep quality and quantity, nutrition is a key component that we should all be paying attention to when considering ways to optimize our zzzs.

“A healthy eating pattern is linked to longer, more restorative sleep,” says Samantha Cassetty, MS, RD, nutrition and wellness expert and co-author of Sugar Shock. We know that both when you eat and what you eat has an impact on your shut-eye, so being strategic with your evening food choices is of the utmost importance when it comes to improving sleep quality and ensuring you wake up feeling rested rather than fatigued. Cassetty explains that there are three key nutrients to focus on for better sleep: fiber, magnesium, and melatonin.


Experts In This Article
  • Samantha Cassetty, MS, RD, registered dietitian and nationally-recognized food, nutrition, and wellness expert with a private nutrition counseling practice

The "big 3" nutrients for sleep quality

1. Fiber

Before you hit the supplement aisle, check out the produce section: It turns out that plant foods have all the building blocks you need for healthy sleep. Cassetty says that if 75 percent of your plate is made up of plant-based foods like fruits, veggies, nuts, whole grains, and pulses, you’re well on your way to better sleep. This is largely due to the fiber content of plant-based foods, which, in addition to benefits like improving digestion to helping prevent heart disease, is also a major player in stepping up sleep quality.

“Fiber is linked with fewer sleep disturbances and better sleep efficiency,” says Cassetty. That means more time actually asleep, and less time tossing and turning. One noteworthy May 2019 study in Nutrients examined the link between the Mediterranean Diet—which is rich in fiber—and sleep quality, finding that the more closely participants followed the diet, the more likely they were to have high-quality sleep.

Cassetty recommends 25 to 38 grams of fiber per day to set yourself up for overnight success, but she cautions that if you aren’t used to eating that much, you should gradually increase to avoid GI distress and make you’re drinking plenty of fluids.

2. Magnesium

Magnesium is another crucial component for sleep that helps your brain and body relax and get ready for sleep. “Magnesium acts on a similar pathway in your brain as anti-anxiety drugs, so it helps your body wind down and get into sleep mode,” according to Cassetty and a May 2017 study in Nutrients.

Magnesium is found in many plant foods, including nuts, seeds, whole grains, pulses, leafy greens, and even dark chocolate. Despite this long list, about half of adults in the United States don’t get enough in their daily diets, which can take a toll on their health from a few different angles. In one April 2022 study in Sleep, magnesium intake was associated with better sleep quality in young adults. Additionally, low magnesium levels are also associated with mood disorders, per a June 2020 study in Nutrients, which can impact sleep (and your overall well-being).

3. Melatonin

For many of us, melatonin might have the strongest association with sleep. But did you know you don’t need to pop a pill to get a dose of melatonin? Melatonin is a hormone that our bodies make to help us regulate day and night. When melatonin rises in the body, you start to feel sleepy. We produce melatonin naturally, but according to Cassetty, your diet can offer a boost.

“Plenty of plant foods supply melatonin, and one study found that compared to people with the lowest veggie intakes, those with the highest had a 16 percent greater concentration of melatonin in their urine, indicating that veggie-eaters got a meaningful boost of this sleep inducer.” (Just note: This study was conducted in 2005; more recent studies are needed to confirm this connection.)

Melatonin is found in a number of plant foods, most notably walnuts, tart cherries, grapes, tomatoes, and oats.

Dietitian tips for eating before bed (including when to do it)

The first thing to consider when dreaming up your ideal bedtime snack is, well, do you actually need one? According to Cassetty, it depends. If you’re starving or stuffed, it’s going to be hard to fall asleep and your sleep quality will likely suffer. Rather, you’re looking for that Goldilocks-level of contentment as you get close to drifting off, and ideally leaving 10 to 12 hours between your last meal and breakfast.

“This fasting period aligns with your circadian rhythm, which is your body’s internal clock,” says Cassetty. “Your circadian rhythm regulates your sleep-wake cycle, and an overnight fasting period provides a strong cue to this clock, helping promote better sleep.” Cassetty also mentions that eating too close to bed can contribute to acid reflux, which can interfere with sleep on top of just being generally uncomfortable.

3 perfectly-designed evening snacks filled with the "big 3" nutrients for sleep

If your stomach is rumbling before bed and you decide you do need a snack, Cassetty recommends the following simple recipes as delicious combinations of fiber, magnesium, and melatonin to help you take the edge off your hunger without leaving you overly full. If you don’t need a bite before bed, they totally work as nutritionally-dense desserts, too.

Banana split with walnuts

Slice open a banana, sprinkle it with some cinnamon, and top with an ounce of walnuts for a delicious bedtime snack with sleep benefits. A banana has about two grams of fiber and 32 milligrams of magnesium. Pairing it with an ounce of walnuts will add another two grams of fiber and 44 milligrams of magnesium, making this duo an excellent source of fiber as well as providing 18 percent of your daily magnesium requirements. You can also try this delicious vegan banana split recipe which perfectly fits the bill.

Kiwi plus oats

Make a quarter cup of old-fashioned oats using boiling water and add a teaspoon of chia seeds to the mixture. This combo has seven grams of fiber and 15 percent of your daily magnesium quota to support better sleep. Plus, oats contain a substantial amount of magnesium per serving—about 138 grams per 1/2 cup, according to the USDA.

There is also one small, older 2011 study in Asia Pacific Journal of Clinical Nutrition that suggests kiwi fruit contains the hormone serotonin, which can be converted into melatonin. But more research is needed to confirm this finding.

This delicious (and easy) chia baked oatmeal will definitely induce some shut-eye, too:

Cherry-chia cobbler

Tart cherry juice is a prime source of melatonin. Along with the juice, this cobbler contains fiber-rich chia seeds, frozen sweet cherries, which balance out the tartness and add fiber, and lower-sugar granola (for more fiber and magnesium). Put a half cup frozen cherries in the microwave and heat for 30 seconds to a minute. Then add about a quarter cup of tart cherry juice and two tablespoons of chia seeds.

Let the mixture stand until it gels (or refrigerate if you're not eating it right away), and then top with a tablespoon of lower-sugar granola. Along with the melatonin from tart cherry juice, this snack provides 22 percent of your daily magnesium needs and meets 25 percent of your daily fiber quota.

—reviewed by Angela Holliday-Bell, MD

Oh hi! You look like someone who loves free workouts, discounts for cutting-edge wellness brands, and exclusive Well+Good content. Sign up for Well+, our online community of wellness insiders, and unlock your rewards instantly. 


Well+Good articles reference scientific, reliable, recent, robust studies to back up the information we share. You can trust us along your wellness journey.
  1. Zuraikat, Faris M et al. “A Mediterranean Dietary Pattern Predicts Better Sleep Quality in US Women from the American Heart Association Go Red for Women Strategically Focused Research Network.” Nutrients vol. 12,9 2830. 16 Sep. 2020, doi:10.3390/nu12092830
  2. St-Onge, Marie-Pierre et al. “Fiber and Saturated Fat Are Associated with Sleep Arousals and Slow Wave Sleep.” Journal of clinical sleep medicine : JCSM : official publication of the American Academy of Sleep Medicine vol. 12,1 (2016): 19-24. doi:10.5664/jcsm.5384
  3. Godos, Justyna et al. “Adherence to the Mediterranean Diet is Associated with Better Sleep Quality in Italian Adults.” Nutrients vol. 11,5 976. 28 Apr. 2019, doi:10.3390/nu11050976
  4. Boyle, Neil Bernard et al. “The Effects of Magnesium Supplementation on Subjective Anxiety and Stress-A Systematic Review.” Nutrients vol. 9,5 429. 26 Apr. 2017, doi:10.3390/nu9050429
  5. DiNicolantonio, James J et al. “Subclinical magnesium deficiency: a principal driver of cardiovascular disease and a public health crisis.” Open heart vol. 5,1 e000668. 13 Jan. 2018, doi:10.1136/openhrt-2017-000668
  6. Zhang, Yijia et al. “Association of magnesium intake with sleep duration and sleep quality: findings from the CARDIA study.” Sleep vol. 45,4 (2022): zsab276. doi:10.1093/sleep/zsab276
  7. Botturi, Andrea et al. “The Role and the Effect of Magnesium in Mental Disorders: A Systematic Review.” Nutrients vol. 12,6 1661. 3 Jun. 2020, doi:10.3390/nu12061661
  8. Meng, Xiao et al. “Dietary Sources and Bioactivities of Melatonin.” Nutrients vol. 9,4 367. 7 Apr. 2017, doi:10.3390/nu9040367
  9. Nagata, Chisato et al. “Association of vegetable intake with urinary 6-sulfatoxymelatonin level.” Cancer epidemiology, biomarkers & prevention : a publication of the American Association for Cancer Research, cosponsored by the American Society of Preventive Oncology vol. 14,5 (2005): 1333-5. doi:10.1158/1055-9965.EPI-04-0915
  10. Lewis, Philip et al. “Food as a circadian time cue – evidence from human studies.” Nature reviews. Endocrinology vol. 16,4 (2020): 213-223. doi:10.1038/s41574-020-0318-z
  11. Kim, Youlim et al. “Associations between obstructive sleep apnea severity and endoscopically proven gastroesophageal reflux disease.” Sleep & breathing = Schlaf & Atmung vol. 22,1 (2018): 85-90. doi:10.1007/s11325-017-1533-2
  12. Lin, Hsiao-Han et al. “Effect of kiwifruit consumption on sleep quality in adults with sleep problems.” Asia Pacific journal of clinical nutrition vol. 20,2 (2011): 169-74.

Our editors independently select these products. Making a purchase through our links may earn Well+Good a commission.

Loading More Posts...