You probably already know caffeine can keep you awake and that a big turkey dinner makes you sleepy. But beyond that, did you know that what (and when) you eat can affect your sleep? The Centers for Disease Control and Prevention notes that about 35% of American adults don’t get enough sleep, so it’s important to learn how to eat for more restful sleep.

The link between diet and sleep

According to the Sleep Foundation, adequate nutrition is essential for high-quality sleep. In particular, a lack of nutrients such as magnesium, calcium, or a variety of vitamins can contribute to sleep problems. Over-consuming unhealthy foods and drinks can also make sleep more difficult. Diets such as the Mediterranean and the DASH, which focus on a careful balance of micronutrients, appear to improve sleep quality. But you don’t need to follow a specific diet to gain these benefits. Just focus on getting plenty of nutritious foods while reducing your consumption of unhealthy fats, sugars, and other empty calories.

What and when to eat for better sleep

In addition to an overall healthy diet, you might want to focus on foods and drinks that promote sleep such as:

  • Tart cherries. Unlike their sweet cousins, tart cherries have high levels of melatonin, a natural chemical that promotes sleep.
  • Malted milk. Milk also contains melatonin, and adding malt powder ups its nutritional value. Malted milk can be especially beneficial for those lacking vitamins B and D.
  • Fatty fish. Salmon and other fatty fish provide vitamin D, which may be especially lacking during the dark winter months. These fish are also packed with omega-3 fatty acids, which help to regulate the brain chemical serotonin.
  • Various nuts, from almonds to cashews, provide an ideal nutritional package to promote sleep. In particular, you’ll get a combination of magnesium, zinc, and melatonin, which are essential for good sleep.
  • Complex carbohydrates. Complex carbs are starchy foods (often plant-based) that contain vitamins and fiber. They can help promote sleep quality, though be careful they’re not too high in sugar, which can negatively affect sleep. Pairing complex carbs with a small amount of protein, such as toast and peanut butter or cereal and milk, can boost your ability to fall asleep.

What to avoid before bedtime

Certain foods and drinks are fine during the day but should be avoided before bed. In general, plan to eat dinner at least three hours before bedtime. If you’re hungry at night, choose a light snack rather than a big meal. In particular, avoid these three sleep-killers in the three hours before going to sleep:

  • Alcohol. Drinking alcohol at night can help you fall asleep fast. But you won’t have a restful night. Instead, the alcohol will wear off, and you will wake up during what should be your deepest and most restorative sleep phase.
  • Spicy or acidic dishes. Your body temperature naturally drops at night, but eating spicy foods before bed can cause you to warm up instead. And both spices and acids can cause indigestion that keeps you awake.
  • High-protein or high-fat foods. A small amount of protein mixed with complex carbohydrates can promote sleep. But too much protein will keep your body working hard on digestion overnight. High-fat foods reduce your brain’s sensitivity to the chemicals that regulate the body clock. Both can make it harder to sleep if consumed too close to bedtime.