By now you probably think you know the rules for getting a good night’s sleep : Turn off the electronics; create a cave-like environment that’s cool and dark; actually go to bed at a respectable hour. But, if you haven’t also been paying attention to how your diet affects your sleep, you might be sabotaging those restorative ZZZs.
As it turns out, sleep and diet both have important effects on each other.
First, let’s just get this out of the way: Caffeine, alcohol, high-fat, and spicy, heartburn-inducing foods all put you in nightmare territory. So you’re going to want to toss all of those into the “all good things in moderation” category.
But there’s also good news: There are some foods and drinks rich in sleep-promoting hormones that can actually help you get some high-quality shut-eye.
And, if you get a good night’s sleep, you’re more likely to fend off high-fat snack attacks. A 2016 study from the University of Chicago  found that when people are sleep-deprived, they have a tough time resisting “highly palatable, rewarding snacks.” (Translated, we’re talking cookies, candy, and chips). The study was published in the journal SLEEP, and it revealed that those deprived of sleep were most likely to snack more in the late afternoon and early evening.
Ready to get this right? We asked nutrition experts to dish on what you should eat at night to help you get some high-quality shut-eye. Consider these the food and drink equivalents of the Sandman.
You’ve probably heard that tryptophan makes you sleepy. (And, you’ve probably witnessed this firsthand after your second serving of turkey on Thanksgiving.) But did you know pumpkin seeds are also a great source of tryptophan? “Tryptophan is an amino acid — meaning that you need to get it from your diet, because your body can’t naturally produce it — that our body uses to produce serotonin and melatonin,” says Rebecca Lewis, R.D. with HelloFresh , a meal delivery service. Both serotonin and melatonin are hormones that regulate sleep and mood.
Cherries or tart cherry juice
Speaking of melatonin, cherries and tart cherry juice are some of the only natural food sources that supply us with melatonin, Lewis says.
Several studies have found that drinking Montmorency tart cherry juice before bed can improve the quality and duration of sleep and reduce insomnia. Among the most recent research is a study conducted by Louisiana State University  and published in the American Journal of Therapeutics that involved a group of insomniacs and found that drinking tart cherry juice extended periods of sleep for an average of 1 hour and 24 minutes each night.
Pistachios, salmon, and chickpeas
This trio of foods has something in common: All are rich in Vitamin B6. “This vitamin is used to make tryptophan, and also regulates how much serotonin our brain produces,” Lewis explains. Too much serotonin can actually impair our sleep, causing us to wake up frequently, Lewis says.
Dark, leafy greens, sweet potatoes, and avocado
Let your dinnertime side dishes help you capture those extra ZZZs. Dark, leafy greens, sweet potatoes, and avocados are all rich in magnesium, potassium, and calcium, which are minerals that calm down nerve activity, allowing us to get good shut-eye, Lewis says. “Bonus: These foods act as a natural muscle relaxer to help reduce muscle cramps,” she says.
Herbal tea and honey
A tea-and-honey combination can help you relax before bed, says Lewis. But to get this right, choose one with chamomile, lavender, or valerian root, as those herbs are known to calm the nervous system. Also, honey is rich in sleep-promoting tryptophan and potassium.
A green smoothie
Green juices and smoothies aren’t just for starting your day! Dark, leafy green veggies like kale, spinach, and Swiss chard are all high in magnesium, which helps facilitate a good night’s sleep because it regulates melatonin, explains Carolyn Dean, M.D., N.D., and author of “The Complete Natural Medicine Guide to Women’s Health ” and “The Magnesium Miracle .” If you make a green drink, super-charge it with anti-inflammatory properties by adding ginger, she suggests. Other foods that are high in magnesium include avocado, almonds, and pecans. In addition to being a natural sleep aid, magnesium relieves muscle tension, explains Dean, who is a Medical Advisory Board Member of the Nutritional Magnesium Association .
Bananas (or a banana tea!)
You get it: Leafy greens are king when it comes to magnesium-rich foods. But, bananas are a lesser-known source of the nutrient. And, more specifically, the banana peel is the most rich source of magnesium, explains Michael Breus, Ph.D., who is known as The Sleep Doctor  and an advisory board member of SleepScore Labs . He recommends brewing a banana tea before bed. You can do so by washing an organic banana, cutting off the stem and the tip, and then cutting the banana in half, leaving the fruit in its skin. Boil the banana for three to four minutes and then drink the water with some honey.
Prebiotics (like onions and garlic)
Probiotics have long been in the health spotlight. But lesser-known prebiotics that promote gut health can help improve sleep, especially after stressful events. Researchers from the University of Colorado found that dietary prebiotics, which are naturally found in foods like chicory, artichokes, raw garlic, and onions, can improve both non-REM and REM sleep after a stressful event. The study  was published in the journal Frontiers in Behavioral Neuroscience.
So, as temperatures dip, it’s a good time to whip up some soup that includes prebiotic dietary fibers like garlic and onions.
Turmeric, a cousin to ginger, has a wide variety of health benefits. The spice is rich in curcumin, which is an antioxidant that helps with the production of dopamine (a mood booster) and serotonin (which helps us sleep), explains Lorraine Miano, a Certified Integrative Health Coach and author . While you might not want to eat curry right before bed, you can instead enjoy it as a soothing drink. Try Miano’s sleep-promoting recipe for “Golden Milk.”
- 2 cups coconut milk (or almond milk)
- 1 teaspoon of turmeric
- Cinnamon to taste
- 1 teaspoon honey or real maple syrup
- Pinch of black pepper (increases absorption)
- Tiny piece of fresh peeled ginger root or 1/4 teaspoon of ginger powder
- Pinch of cayenne pepper (optional)
Blend all ingredients in a high-speed blender until smooth. Pour into a small saucepan and heat for 2-4 minutes over medium heat until hot but not boiling. Drink immediately.
Milk also contains tryptophan, which as we told you is a sleep-inducing powerhouse. It’s also a rich source of calcium, which helps muscles relax, says Becky Kerkenbush, registered dietitian and member of the Wisconsin Academy of Nutrition and Dietetics .
What to avoid
If you are desperate for a good night’s sleep, Kerkenbush suggests steering clear of large meals, as well as high-fat meals. It’s also a good idea to avoid caffeine, alcohol, large amounts of liquids, and nicotine prior to sleep, she says. Also worth noting: A 2016 study  published in the American Academy of Sleep Medicine found that people who tend to eat less fiber, more saturated fat, and more sugar get lighter, more disrupted sleep.
More from Make It Better:
- Foods You Should Eat to Fight Cancer 
- 12 Simple Diet Swaps to Make You Healthier 
- 9 Foods You Should Be Eating to Boost Brain Power 
Brittany Anas is a freelance writer who specializes in health, fitness and travel writing. She also contributes to Men’s Journal, Women’s Health, Trip Savvy, Simplemost, Orbitz, and Eat This, Not That! She spent a decade working at daily newspapers, including The Denver Post and the Daily Camera in Boulder, Colorado, and she is a former federal background investigator. In her free time, Brittany enjoys hiking with her gremlin-pot belly pig mix that the rescue described as a “Boston Terrier” and coaching youth basketball. She also works with domestic abuse survivors, helping them regain financial stability through career coaching. Follower her on Twitter  and Instagram .