Most experts recommend finishing your last meal about three hours before you go to sleep. This window gives your body enough time to digest food while you’re still upright, without leaving you so hungry that falling asleep becomes difficult. The specific clock time matters less than the gap: whether your bedtime is 10 p.m. or midnight, count back three hours and aim to wrap up eating by then.
Why Three Hours Is the Sweet Spot
Your digestive system works best when you’re upright. After a meal, your stomach produces acid and begins breaking food down, a process that takes a few hours for a full meal. If you lie down while your stomach is still full, gravity can no longer keep that mixture of food and acid where it belongs. It moves up into your esophagus, causing heartburn or acid reflux. This is the main physical reason behind the three-hour guideline, and it applies to everyone, not just people with chronic reflux.
Some sleep researchers put the window slightly shorter, at two to four hours before bed for a full meal. The difference comes down to meal size. A large dinner with plenty of fat and protein takes longer to clear your stomach than a lighter one. If your last meal is substantial, lean toward the longer end of that range. A smaller plate can get by with two hours.
How Late Eating Affects Your Sleep
Beyond reflux, eating too close to bedtime can interfere with sleep quality in subtler ways. Your body ramps up melatonin production in the hours before sleep, and melatonin does more than make you drowsy. It also suppresses insulin release. When you eat during this melatonin surge, your body has a harder time processing the incoming glucose, which can leave you in a metabolically awkward state that disrupts restful sleep.
Researchers have suggested avoiding meals during the two to three hours before bed and the first hour after waking, precisely because melatonin levels are elevated during those windows. Eating during high-melatonin periods impairs glucose tolerance, meaning the food you eat is handled less efficiently than it would be earlier in the day.
The Metabolic Cost of Eating Late
Your body’s ability to process sugar follows a daily rhythm. Insulin sensitivity peaks in the morning and gradually declines as the day goes on. Eating the exact same meal at night produces a noticeably higher blood sugar spike than eating it in the morning. Over time, this pattern adds up.
One study found that healthy adults who shifted their eating window later in the day (eating between noon and 11 p.m. instead of earlier hours) gained more weight and had higher insulin levels after eight weeks, even without changing what or how much they ate. The timing alone made a measurable difference. This doesn’t mean a single late dinner will cause problems, but a consistent habit of eating right before bed works against your body’s natural metabolic clock.
If you do eat late, the composition of your meal matters. Research has shown that a high-protein meal eaten at night produces a significantly lower blood sugar response than a standard mixed meal. Choosing protein over carb-heavy options when eating later can partly offset the metabolic disadvantage.
When You’re Hungry Before Bed Anyway
Sometimes the three-hour window doesn’t work out. You got home late, dinner ran long, or you’re just genuinely hungry at 11 p.m. In those cases, a small snack under about 150 calories is unlikely to cause problems and may actually help. One study found that a low-calorie snack (either protein or carbohydrate-based) eaten 30 minutes before sleep boosted morning metabolism.
Some foods are particularly well-suited for late-night snacking because they contain compounds that support sleep rather than fighting it:
- Tart cherries or tart cherry juice contain melatonin and have been shown to reduce insomnia symptoms.
- Kiwis improved sleep quality in one study after just four weeks of eating two kiwis an hour before bed. Participants fell asleep faster and slept longer.
- Bananas, pineapple, and oranges increased melatonin production about two hours after eating them.
- A banana with a small handful of almonds provides over 100 milligrams of magnesium, a mineral linked to better sleep, for roughly 200 calories.
- Pistachios contain more melatonin than any other nut, plus tryptophan, an amino acid your body uses to make both melatonin and serotonin.
- Plain yogurt delivers calcium, protein, and a neurotransmitter called GABA that helps calm the nervous system before sleep.
- Oats contain both magnesium and melatonin, making a small bowl of oatmeal a reasonable choice.
The key is keeping portions small and avoiding heavy, greasy, or highly acidic foods that take longer to digest and are more likely to trigger reflux.
If You Have Diabetes
People who take insulin or certain diabetes medications are one important exception to the “don’t eat before bed” advice. A bedtime snack can help prevent blood sugar from dropping dangerously low overnight, a condition called nocturnal hypoglycemia. If you find yourself needing a late-night snack regularly to keep your blood sugar stable, that’s worth discussing with your doctor, since it may signal that your medication dose needs adjusting rather than that you need to keep snacking.
A Practical Approach
The simplest version of all this: finish dinner three hours before bed, and if you need something after that, keep it small, light, and protein- or fruit-based. You don’t need to set rigid cutoff times or stress over the occasional late meal. What matters most is the pattern. Consistently eating large meals right before lying down taxes your digestion, spikes your blood sugar at the worst possible time, and fragments your sleep. Giving your body that buffer of a few hours is one of the easiest changes you can make for both better sleep and better metabolic health.

