X
CNET logo Why You Can Trust CNET

Our advice is expert-vetted and based on independent research, analysis and hands-on testing from our team of Certified Sleep Coaches. If you buy through our links, we may get a commission. Reviews ethics statement

The Surprising Connection Between Your Diet and Sleep Quality

A nutrition expert from MyFitnessPal reveals the best foods to improve your sleep and the foods you should stay away from.

McKenzie Dillon Writer
McKenzie, a Certified Sleep Science Coach and proclaimed mattress expert, has been writing sleep content in the wellness space for over four years. After earning her certification from the Spencer Institute and dedicating hundreds of hours to sleep research, she has extensive knowledge on the topic and how to improve your quality of rest. Having more experience with lying on mattresses than most, McKenzie has reviewed over 150 beds and a variety of different sleep products including pillows, mattress toppers and sheets. McKenzie has also been a guest on multiple radio shows including WGN Chicago as a sleep expert and contributed sleep advice to over 50 different websites.
Expertise Certified Sleep Science Coach, Certified Stress Management Coach, Bachelor of English.
McKenzie Dillon
5 min read
An artfully arranged bowl of vegetables and rice

Nutrition is an important piece of getting better sleep. 

Cook Shoots Food/Getty Images

The food you eat impacts almost everything you do, which is one reason it's so important to be mindful of what you put in your body. Good nutrition has tons of perks: It reduces the risk of diseases such as stroke, Type 2 diabetes and heart disease, boosts your mood and makes you feel more energized. It can even improve how you sleep at night, another major aspect to having a healthy body and mind. A full night's sleep offers a lot of the same benefits as conscious eating. In fact, they go hand in hand. 

Eating the wrong foods at the wrong time can be harmful to your sleep quality, which plays an important role in maintaining your physical and mental health. On the flip side of the same token, you have a higher chance of making poor food choices after a night of bad sleep. Below, learn how you can improve your food choices to get higher-quality rest, including the best foods for better sleep and what you need to avoid. 

Read also: How to Stay Cool at Night Even When It's Hot Outside

How poor sleep affects your health

The recommended amount of sleep for adults is seven to nine hours each night. During that time, your brain cycles through the four stages of sleep: three stages of NREM (non-rapid eye movement) and one stage of REM (rapid eye movement). 

  • NREM sleep: The quiet sleep stages where your brain is working to retain memories and knowledge, in addition to repair, refresh, and restore your body. 
  • REM sleep: The active sleep stage where your body is working to repair cells and muscle tissue, promote bone and muscle growth and helps strengthen the immune system. 

If you're waking up often in the middle of the night or have trouble getting a full night's sleep, you prevent your body from running through its necessary processes that keep you healthy and productive. Continuous poor sleep puts you at risk for:

  • Heart disease
  • Stroke
  • Weight gain
  • High blood pressure
  • Bad memory
  • Weakened immune system

Unbalanced nutrition tends to be a common culprit for poor sleep, especially if you're eating certain foods too close to bedtime. 

High angle view of woman holding bowl of food

There's several foods you shouldn't eat too close to bedtime. 

Natalia Lavrenkova/EyeEm/Getty Images

Nutrition for quality sleep

There seems to be a clear link between nutrition and your quality of sleep. To find out more, I spoke to Stephanie Nelson, a registered dietitian who works as a nutrition expert at the tracking app MyFitnessPal. Nelson explained, "The relationship between sleep and nutrition is very complex and we don't know everything about all the associations between sleep and food. However, a good general summary is that any biological process, including sleep, is influenced by getting the right amount of nutrients. "

"For example, having high blood sugar impacts your energy in the moment, which can prevent you from sleep," Nelson continued. "Other nutrients impact neurotransmitters that make it easier to relax and turn your brain off for sleep." 

While food affects sleep, the amount of quality sleep you get can also impact your eating habits. Nelson said, "Interestingly, the relationship goes both ways. There's research showing that poor sleep can negatively impact hormone balances that affect your hunger, and people who sleep less tend to eat more overall."

Making more conscious choices about food and when you're eating it can make a big difference in your sleep quality.

The do's and don'ts on eating for better sleep

Here are Nelson's tips on how to eat for better sleep. 

Do's

1. Eat a balanced dinner 

"The building blocks of a balanced dinner are a protein source, high-fiber carbohydrate source, and a vegetable. This might look like a grilled marinated chicken breast, some quinoa, and roasted veggies," said Nelson. "You could also get more creative with it, like a coconut curry made with tofu and sauteed veggies, served over brown rice, or tacos made with the protein of your choice, some beans, and cabbage and onions (and all your other favorite toppings)." 

Chicken and veggies for sleep

A balanced diet is critical to good sleep. 

Getty Images/Burcu Atalay Tankut

2. Eat foods that promote serotonin production

Serotonin is required for your body to make melatonin, the hormone responsible for regulating sleep. But Nelson also warns that too much serotonin is associated with poor sleep. 

"In order for your body to produce the right amount of serotonin, you need to consume tryptophan, an amino acid you can find in most animal-based foods, oats, nuts, and seeds," Nelson explained. "You also need to have a carbohydrate source, which allows for tryptophan to be used for serotonin rather than other processes. Other nutrients like vitamin B6, present in sweet potatoes among other foods, are also needed for the right amount of serotonin production."

3. Eat around three hours before bedtime

You might have heard that you shouldn't eat right before bedtime if you want a good night's rest. But how soon, exactly, should you stop eating? "It's different for everyone," said Nelson. "Most experts recommend to eat three hours before bedtime for best sleep results, so start there, but definitely play with it. Some people can eat closer to bedtime and still have a good night's sleep," she said.

Don'ts

1. Avoid caffeine, sugary drinks and alcohol before bed

You probably know that caffeine isn't the best nighttime beverage, but what about alcohol or juices? Nelson says you should try to avoid those in the hours right before bed too.

"Being hydrated is key to a good night's sleep," she said. "Alcohol dehydrates you, so for the first step, reduce alcohol consumption near bedtime. High sugar drinks also can interfere with sleep, and anything with caffeine." 

"If you're having trouble sleeping, definitely check when your most recent caffeinated beverages are consumed before bed," she noted.

2. Don't eat dessert close to bedtime

For individuals with a sweet tooth, don't eat foods like ice cream, cookies or chocolate before bedtime. Nelson explains that "low-fiber, high-sugar snacks before bed can cause a spike and then a drop in blood sugar." These irregular blood sugar levels can disrupt your sleep in multiple ways, making it hard for you get deep rest.

Hand holding plate of donuts

Try not to eat high-sugar snacks before bed.

LordHenriVoton/Getty Images

3. Don't overdo late-night indulgences

"Eating large amounts of any type of food too close to bedtime will probably affect your sleep, especially if it's high in sugar or fat. On the flip side, if you go to bed hungry that might also negatively impact your sleep," Nelson said 

Life happens, and sometimes you need a midnight snack to avoid falling asleep with your stomach growling. Nelson advises eating something that's small, high in fiber and pairing it with protein "to keep your blood sugar from spiking and to keep you full until morning." She adds, "Try a banana with peanut butter or a handful of berries with yogurt." 

The information contained in this article is for educational and informational purposes only and is not intended as health or medical advice. Always consult a physician or other qualified health provider regarding any questions you may have about a medical condition or health objectives.