The trick to a better night’s sleep could be hiding in your kitchen

by Kaiser Permanente |
Person sleeping peacefully

Getting enough sleep is an important part of a healthy lifestyle. It can keep your immune system strong, improve your mood, and help you feel less stressed. Yet 1 in 3 adults don’t get the recommended amount of sleep.1 And during times of personal or professional stress, it can be even harder to sleep well.

If you’re struggling to sleep through the night, one good first step is to look at your diet. Certain foods can help you sleep better. And you may already have some of them in your kitchen. So, what can you eat during the day to set yourself up for a good night’s rest?

3 foods to help with sleep

In general, it’s best to eat a healthy diet full of fruits and vegetables, lean protein, and whole grains. Having a balanced diet can help with your overall health, including your sleep. Here are 3 foods that are easy to add to your diet to help you sleep better.


Not only are many nuts high in heart-healthy fat, but some also have the hormone melatonin.2 Melatonin helps regulate your sleep-wake cycle.

Nuts with naturally high amounts of melatonin include pistachios, walnuts, and almonds. So, reach for a handful of nuts for an afternoon snack. Or consider adding pistachios to a hearty kale and butternut squash salad.


Another healthy option that can help you sleep well? Fruit. Bananas, oranges, pineapple, and tart cherries are all fruits that have melatonin.3

If you’d rather eat fruit with less sugar, avocados are a good choice. They’re packed with vitamins and potassium, and they also have magnesium. This mineral helps your body with muscle relaxation, energy production, and more. And some research shows a link between magnesium and decreased depression and anxiety,4 which can affect how well you sleep. Avocados also make a convenient snack, from avocado toast to a healthy take on chocolate pie.


Sipping a cup of tea can be a soothing way to end the day. And certain teas can help promote good sleep. Chamomile, for example, is an herb often used in tea and is known to help with sleep. One study found that chamomile can significantly improve sleep quality.5 You can find many chamomile tea options in your local grocery store. But whether you want chamomile, peppermint, or green tea, choose one without caffeine.

Of course, plenty of other foods have melatonin and magnesium. To find others, you can  search the U.S. Department of Agriculture’s online database.

Tip: It’s a good idea to avoid eating any food, especially heavy meals, too close to bedtime. And in general, avoid caffeine at least 4 to 6 hours before you go to bed.

Considering a supplement to increase the melatonin or magnesium you’re getting? Talk to your doctor first. Many supplements can interfere with medications you may be taking.

More resources for better sleep

Need more help improving your sleep? From bedtime meditations to more tips for catching better z’s, we have you covered. Check out our online "Sleeping better" resource center.

1"Sleep and Sleep Disorders," CDC, September 7, 2022

2Antia Verde et al., "Melatonin Content in Walnuts and Other Commercial Nuts. Influence of Cultivar, Ripening and Processing (Roasting)," Journal of Food Composition and Analysis, January 2022.

3Harsha Pattnaik, "Nutritional Elements in Sleep," Cureus, December 2022

4Andrea Botturi et al., "The Role and the Effect of Magnesium in Mental Disorders: A Systematic Review." Nutrients, June 2020

5Truong Hong Hieu et al., "Therapeutic Efficacy and Safety of Chamomile for State Anxiety, Generalized Anxiety Disorder, Insomnia, and Sleep Quality," Phytotherapy Research, June 2019