FastTrack

Intermittent Fasting and Sleep: How to Protect Your Nights

Intermittent fasting and sleep affect each other, and the claims online run well ahead of the evidence. Trials of time-restricted eating mostly find that sleep stays about the same, with small improvements at best. Some people do sleep worse in the first week or two, usually for reasons they can fix, such as a last meal at the wrong hour or an afternoon coffee standing in for lunch.

The steps below run in the order you will need them, from the first restless nights to a schedule built around your bedtime, and end with the signs that call for a doctor.

1. Know what studies on intermittent fasting and sleep found

The broadest summary so far is a 2026 meta-analysis that pooled 13 studies of time-restricted eating with 638 participants. In before-and-after comparisons, sleep got slightly longer and sleep quality scores improved a little, more clearly with early eating windows. In the controlled trials, which compare fasters with similar people eating as usual, those differences disappeared. The authors concluded that any effect on sleep may be modest.

A longer trial points the same way. At the University of Illinois Chicago, 90 adults with obesity were randomly assigned to eat only between noon and 8 pm, to cut their calories by a quarter, or to change nothing, for a full year. Self-reported sleep quality, sleep duration, insomnia severity and the risk of sleep apnea did not change in either diet group compared with the control group.

So for most people, fasting neither fixes a bad night nor ruins a good one. The timing of your last meal and your last coffee tends to matter more, and both are yours to set.

2. Expect a few restless nights in the first weeks

Many people sleep lighter during the first few nights of a new schedule. Usually dinner moved, and you now go to bed with an emptier stomach than you are used to, or a 3 pm coffee became the thing that gets you to your first meal. Trials mostly measure sleep after weeks or months, so these early nights are less studied. In practice they tend to settle within two or three weeks, as your hunger adjusts to the new hours.

Match what you notice with its likely cause first:

What you noticeLikely causeWhat to try
Stomach growling as you try to fall asleepLast meal too early or too smallMove the last meal later, or add protein to it
Lying in bed alert with your mind racingCaffeine late in the afternoonHave your last cup about eight hours before bed
Heartburn or a heavy stomach once you lie downA large or fatty meal close to bedtimeFinish eating two to four hours before bed
Waking up to pee at 3 amMost of the day's water drunk in the eveningDrink more before 6 pm and only sip after dinner
Groggy and starving the morning after a short nightSleep debtShorten that day's fast and go to bed earlier

3. Finish your last meal two to four hours before bed

A big dinner right before bed is the classic sleep problem when your eating window runs into the evening. In a Brazilian study, 52 healthy adults kept a three-day food diary and had their sleep recorded for a night in a lab. Food eaten close to sleep, at dinner or in a late snack, went with poorer sleep, and in women the share of fat and calories eaten at night was linked to how long they took to fall asleep. It was a correlation study, so it cannot prove that late food caused the poor sleep.

Going to bed too empty causes its own trouble. Finish dinner at 4:30 pm with lights out at 11:30 pm and you face seven waking hours of fasting first, which for many beginners means lying in bed listening to their stomach. Early windows looked slightly better for sleep in the pooled before-and-after data of the 2026 meta-analysis, a result controlled trials have not confirmed, so there is no reason to force an early dinner that leaves you hungry at bedtime.

The comfortable middle for most people is a last meal finished two to four hours before bed: dinner done between 7 and 9 pm if you sleep at 11. Keep that plate moderate, built on protein and vegetables, and move the fried food or the second helping of pasta earlier in your window.

4. Plan for hunger at night

Night hunger on a fast is mostly habit. If you ate chips or ice cream in front of the TV for years, your body expects food around 9 or 10 pm, right when you are trying to wind down. Our guide to hunger while fasting explains how these waves rise and fade. At bedtime, these help many people:

  • A warm drink without caffeine: chamomile or peppermint tea, or hot water with a slice of lemon, around 9 pm. Warm milk is food, so it belongs inside your window.
  • Brushing your teeth right after dinner: for many people it closes the kitchen for the night.
  • A bigger last meal: add a palm-size piece of chicken or salmon, or a bowl of lentils, so you start the fast properly full.

Sleep and hunger also feed each other. In a lab study, 12 healthy young men had two nights of short sleep and, on another occasion, two nights of extended sleep. After the short nights their ghrelin, a hormone that drives hunger, was 28% higher and their hunger 24% higher, with the biggest rise in appetite for calorie-dense, carb-heavy foods. A short night makes the next fast harder, and if hunger then keeps you up, the loop continues. If hunger keeps you awake for half an hour on several nights a week, eat a bigger last meal or move the window later.

5. Move your last coffee earlier

Black coffee helps many fasters through the morning, and it becomes a problem when it drifts into the afternoon. In a study of sleep at home, adults took 400 mg of caffeine, roughly four 8-ounce cups of brewed coffee, at bedtime, three hours before bed or six hours before bed, and the researchers compared each with a placebo. Every one of those timings disturbed sleep, including the dose six hours before bed, and the authors advised avoiding substantial caffeine for at least six hours before bedtime.

How quickly you clear caffeine varies a lot from person to person, so treat six hours as a minimum. If you sleep at 11 pm, have your last cup by 3 pm, earlier if you are sensitive. Tea and energy drinks count too, and so does the can of cola many people grab at a 4 pm meeting; our page on whether Coke Zero breaks a fast covers the sweetener side of that habit. For something warm late in the day, switch to decaf, which still has a little caffeine, or to an herbal tea.

6. Build your fasting window around your bedtime

Start from your bedtime and work backward: last meal two to four hours before it, last caffeine about eight hours before it, a margin above the six hours in the coffee study. A large share of a 16-hour fast then happens while you sleep. Our guide to intermittent fasting hours compares morning and evening windows in more detail. These 16:8 schedules fit common bedtimes:

Your bedtimeEating windowLast caffeine by
9:30 pm, early riser9:30 am to 5:30 pm1:30 pm
10:30 pm11 am to 7 pm2:30 pm
11 pmNoon to 8 pm3 pm
Midnight1 pm to 9 pm4 pm
1 am, night owl or late shift2 pm to 10 pm5 pm

Keep roughly the same hours on weekends. A window that slides two hours later every Saturday drags your dinner and bedtime with it, which can make Sunday night harder. After a late Friday, let the fast end later on Saturday and keep the last meal the same distance from sleep. FastTrack starts and stops the fast automatically on the schedule you set, which keeps those hours steady without any tapping.

7. Know when poor sleep means stop or see a doctor

A few restless nights in the first week are common. These signs call for a change of plan or a doctor:

  • Poor sleep that lasts past two or three weeks, or leaves you exhausted during the day: shorten the fast or widen the window, and talk to your doctor if it continues.
  • Dizziness or fainting, especially when you get up at night: stop the fast and eat, and see a doctor if you faint or it happens again.
  • Diabetes treated with insulin or tablets that lower blood sugar: waking up sweaty, shaky or with nightmares can mean low blood sugar at night. Agree on a fasting plan with your doctor before you start.
  • Loud snoring, gasping in your sleep or heavy daytime sleepiness: these can be signs of sleep apnea, which needs a doctor whatever your eating schedule.
  • Pregnancy, breastfeeding, a history of eating disorders or being under 18: skip fasting unless your doctor agrees to a specific plan, and stop if you lie awake thinking about food.

The short version

Trials suggest intermittent fasting changes sleep very little either way, and a rough first week usually comes down to timing. Finish your last meal two to four hours before bed and have your last caffeine about eight hours before it. A warm drink gets most people through the evening hunger wave. If poor sleep lasts more than a few weeks, or comes with dizziness or night-time shakiness, see a doctor.

Frequently asked questions

Can intermittent fasting cause insomnia?

Controlled trials mostly find no change in sleep quality or insomnia severity with time-restricted eating, including a year-long study of eating between noon and 8 pm. Some people do sleep worse in the first week or two, usually because of hunger at bedtime or caffeine later in the day. If poor sleep lasts more than a few weeks, adjust the schedule and talk to your doctor.

How many hours before bed should I stop eating when I fast?

Two to four hours is a practical range for most people. Eating close to bedtime has been linked to poorer sleep, while a last meal six or seven hours before bed can leave you lying awake hungry.

Does intermittent fasting improve sleep?

Probably only a little, if at all. A 2026 meta-analysis found small improvements in before-and-after studies and no difference in controlled trials that compared fasters with people eating as usual. How your sleep responds varies from person to person.

What can I drink at night while fasting?

Water, chamomile or peppermint tea and hot water with a slice of lemon have no or almost no calories and no caffeine. Warm milk is food and breaks the fast, so have it inside your eating window.

When should I have my last coffee if I fast?

In a sleep study, a large dose of caffeine still disturbed sleep when taken six hours before bed. Aim for your last cup about eight hours before bedtime, so around 3 pm if you sleep at 11 pm.

Is it OK to go to bed hungry while fasting?

Mild hunger that fades within 20 minutes is common in the first weeks and usually eases as your body adjusts. If hunger keeps you awake several nights a week, eat a bigger last meal or move your window later.

Track your fasts with FastTrack

A fasting timer that follows your schedule, an AI coach for the hard hours, and meal ideas for your eating window.

Download FastTrack

Medical Disclaimer: This article is for educational purposes only and does not replace professional medical advice. Always consult a healthcare professional before starting or modifying any fasting or nutrition plan, especially if you have a medical condition, are pregnant, or taking medication.

Sources

  1. Jin X, Li T, Xu X et al. (2026). The Effect of Time-Restricted Eating on Sleep: A Systematic Review and Meta-analysis. Nutr Rev, 84(3), 514-526. View on PubMed
  2. Lin S, Cienfuegos S, Ezpeleta M et al. (2024). Time-Restricted Eating Versus Daily Calorie Restriction: Effect on Sleep in Adults with Obesity over 12 Months. Nutrients, 16(20), doi: 10.3390/nu16203528. View on PubMed
  3. Crispim CA, Zimberg IZ, dos Reis BG et al. (2011). Relationship between food intake and sleep pattern in healthy individuals. J Clin Sleep Med, 7(6), 659-64. View on PubMed
  4. Spiegel K, Tasali E, Penev P et al. (2004). Brief communication: Sleep curtailment in healthy young men is associated with decreased leptin levels, elevated ghrelin levels, and increased hunger and appetite. Ann Intern Med, 141(11), 846-50. View on PubMed
  5. Drake C, Roehrs T, Shambroom J et al. (2013). Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J Clin Sleep Med, 9(11), 1195-200. View on PubMed

Related Articles

How to deal with hunger while fasting → Does Coke Zero break a fast? → Intermittent fasting hours →