How Does Eating Affect Sleep?

What you eat and drink, and when, can impact your sleep, sometimes dramatically. Some of the advice for eating and drinking for better sleep may seem like common sense. Other ways that food and beverages influence sleep may be less well known.

Timing of meals and drinks

People who have night-time gastrointestinal reflux (GERD) are more likely to have insomnia, sleep apnea, and restless legs syndrome (RLS). That may explain why eating half a cheesy, meaty pizza just before bedtime keeps you awake. Even if you do not normally have GERD, heavy foods eaten before bedtime can cause heartburn that keeps you awake.1,2

It may take some trial and error to find which foods disrupt your sleep. Many people report that fatty or fried foods, spicy foods, onions, citrus fruits and juices, and carbonated drinks lead to indigestion and poor sleep.1,2

In general, eat your last food 2 to 3 hours before going to sleep.2

Drinking and sleep

Up to 1 in 5 Americans have a drink at night to help them fall asleep. And it is true that alcohol makes you sleepy. However, it also leads to poor sleep later in the night. That is because after your body processes the alcohol, chemicals are released that wake you up. Alcohol also blocks REM sleep, which is necessary for you to feel rested in the morning. It also makes snoring and sleep apnea worse. As with food, avoid drinking 2 to 3 hours before bedtime.3

Alcohol is not the only drink that can get in the way of good sleep. Caffeine is another problem beverage for many people. If you have a sleep disorder, your doctor may ask you to record how much coffee, tea, or soda you consume and when. Caffeine late in the day can lead to insomnia or may make RLS worse. On the other hand, drinking large quantities of caffeine may be an attempt to mask daytime sleepiness caused by sleep apnea or narcolepsy.

Drinks that may help you get better sleep include chamomile tea, warm milk, and tart cherry juice.4

Magnesium-rich foods for sleep

Magnesium is a mineral found in many foods. It plays an important role in several body processes such as metabolism, mood and stress regulation, heart and bone health, and sleep. Magnesium promotes sleep by helping the brain chemical GABA work. Doctors have discovered that too little magnesium in the diet can make insomnia and RLS worse.

Many people do not get enough magnesium in their diets, so eating more of certain foods may help with your sleep problems. Foods rich in magnesium include:5

  • Dark, leafy greens (spinach, kale)
  • Seeds and nuts (sunflower seeds, sesame seeds, cashews, almonds)
  • Squash, broccoli, and other vegetables
  • Beans and peas
  • Dairy products
  • Meat
  • Unprocessed whole grains
  • Chocolate
  • Coffee

The average adult needs between 100 to 350 mg of magnesium each day to help with sleep. However, very large doses of magnesium can cause serious side effects. Talk with your doctor about the right amount of magnesium for you.5

Diet changes for restless legs syndrome

Sugar, dairy, caffeine, alcohol, and smoking are all known to make RLS symptoms worse. This is especially true if these are consumed in large quantities just before bedtime. Some people may need to completely cut 1 or all of these substances out of their life.6-8

Some people find it helps to add vitamin D, B9 (folate), or B12 supplements to their diet or to eat more food rich in these nutrients.6-8

Weight loss and sleep apnea

Doctors know that poor sleep can lead to weight gain, and weight gain can lead to poor sleep. That is why losing weight is recommended for many people with a sleep disorder, especially for sleep apnea.

About 40 percent of men who are overweight have sleep apnea. This increases to up to 90 percent of men with a body mass index (BMI) of 40 or higher. The good news is that even small to moderate weight loss can improve sleep apnea. One study found that losing 10 to 15 percent of body weight resulted in a 30 to 50 percent improvement in sleep apnea. That means that someone who weighs 200 pounds and loses 20 pounds can expect to sleep 30 to 50 percent better, all without a CPAP machine.9

By providing your email address, you are agreeing to our privacy policy. We never sell or share your email address.

More on this topic

Written by: Jessica Johns Pool | Last reviewed: July 2021