Somnera
Sleep restriction

How to calculate your sleep window

The arithmetic behind sleep restriction, written out. Two weeks of diary, one division, and a floor you do not go below.

5 min read

Last reviewed September 1, 2026

A marked scale with one span bracketed off it, the way a sleep window is measured out of a night.

Share

Sleep restriction has a reputation for being complicated. The arithmetic is one division and one subtraction. What makes it hard is holding to the answer, not working it out.

Here is the whole calculation, along with the rules that stop it going wrong.

Before any of it: is this the right protocol for you?

Deliberately restricting sleep is not a neutral thing to do, and it is not appropriate for everyone. Do not use this approach, and speak to a clinician instead, if any of the following apply:

  • You have a seizure disorder or bipolar disorder, where sleep loss carries specific risk.
  • You are pregnant.
  • You work shifts, or your schedule changes week to week.
  • You already have significant daytime sleepiness, or you drive for work.
  • You snore loudly, wake gasping, or have been told you stop breathing.

Nothing below applies until that list is clear.

Step one: two weeks of diary

Every calculation here runs on numbers you do not have yet, and cannot estimate. Memory of a bad night is unreliable in a known direction — people with insomnia consistently recall more time awake than a record shows.

So: one to two weeks of entries before you change anything. Each morning, roughly:

  • What time you got into bed
  • How long you think you took to fall asleep
  • How long you were awake during the night, in total
  • What time you got out of bed for the day

Estimates are expected. Round to the nearest fifteen minutes. Precision is not what makes this work and chasing it means watching the clock, which makes the night worse.

Step two: two numbers

Time in bed. From getting in to getting out. If you were in bed at 11:00 PM and up at 7:00 AM, that is 8 hours.

Total sleep time. Time in bed, minus how long you took to fall asleep, minus time awake in the night. Eight hours in bed, 50 minutes to fall asleep, 40 minutes awake: that is 6 hours 30 minutes of sleep.

Do that for every night, then take the average total sleep time across the whole two weeks. That average is the number the window is built from.

Step three: sleep efficiency

Total sleep divided by time in bed, as a percentage.

Six and a half hours of sleep in eight hours of bed is 6.5 ÷ 8 = 81%. Consolidated sleep usually sits above 85%. Someone with insomnia is often in the 60s or 70s — not because they are sleeping catastrophically little, but because the sleep is spread thin across a lot of time in bed.

This is the number the whole protocol moves, and not the same thing as your severity score, which measures distress and daytime impact rather than arithmetic.

Take the free assessment to see:

  • Your Insomnia Severity Index (ISI) score
  • A personalized 6-week CBT-I plan, built by a sleep physician
  • How your sleep improves, night by night
Start free assessment

Step four: set the window

Your sleep window equals your average total sleep time. That is the rule. If you averaged 5 hours 45 minutes of sleep, your window is 5 hours 45 minutes in bed.

Two constraints on that:

Never below five hours. If the arithmetic produces less, set five hours anyway. That floor is standard across the protocols. Going under it costs daytime function without buying more consolidation, and if your genuine average is under five hours you should be working with a clinician rather than restricting harder.

Some protocols add 30 minutes. Adding a half-hour to the average is a common, gentler variant. It is slower and considerably easier to stick to, which matters more than the theoretical optimum for something most people abandon in week two.

Step five: anchor the wake time, then count back

Fix the rising time first, and pick one you can hold seven days a week — including Saturday. Then subtract the window to find your earliest bedtime.

Average sleep 5h45m, so the window is 5h45m. You must be up at 6:30 AM for work. 6:30 AM minus 5h45m is 12:45 AM. That is the earliest you may get into bed. Not a target — a floor. If you are not sleepy at 12:45, you stay up.

The rising time is the piece to protect above all others. It anchors the whole schedule, and a weekend lie-in shifts it by hours and takes days to unwind. That is why Monday night is so reliably the worst night of the week.

Step six: recalculate weekly

At the end of each week, work out your efficiency across that week.

  • Above 85–90%: add about 15 minutes to the window, at the bedtime end.
  • Between 80 and 85%: hold. Change nothing.
  • Below 80%: reduce by about 15 minutes, respecting the five-hour floor.

Widen on the week, never on a run of good nights. Three good nights and an early bedtime is the single most common way people stall — it dilutes the pressure that produced the good nights.

What the first fortnight is like

Worse. That is the mechanism, not a fault: restricting time in bed increases daytime sleepiness before it consolidates sleep, and that has been measured directly. Expect it, do not nap, be careful about driving, and do not judge the approach at day five.

In Somnera all of the above is done for you — the diary takes under two minutes in the morning and the window is calculated and adjusted from your own entries, so you never run the arithmetic yourself. The habits that decide whether it works matter more than the sums.

The rest of this section covers why the method works and what the diary is actually measuring.

Somnera is a self-guided education program built on CBT-I, founded and written by Dr. Camilo Ruiz, DO, FACOI, FAASM. It is not a diagnosis and does not replace care from your own clinician. Start with the free assessment.

Citations

  • Spielman AJ, Saskin P, Thorpy MJ. Treatment of chronic insomnia by restriction of time in bed. Sleep. 1987;10(1):45–56.
  • Kyle SD, et al. Sleep restriction therapy for insomnia is associated with reduced objective total sleep time, increased daytime somnolence, and objectively impaired vigilance. Sleep. 2014;37(2):229–237. doi:10.5665/sleep.3386
  • Carney CE, et al. The Consensus Sleep Diary: standardizing prospective sleep self-monitoring. Sleep. 2012;35(2):287–302. doi:10.5665/sleep.1642
  • Edinger JD, et al. Behavioral and psychological treatments for chronic insomnia disorder in adults: an American Academy of Sleep Medicine clinical practice guideline. J Clin Sleep Med. 2021;17(2):255–262. doi:10.5664/jcsm.8986

Frequently asked questions

One to two weeks before setting anything. Fewer than seven nights and a couple of unusual ones distort the average enough to set the window wrong.

Do not go below five hours in bed. That floor is standard in the protocols, and going under it produces daytime impairment without a corresponding gain. If your average sleep is genuinely below five hours, that is a reason to work with a clinician rather than to restrict harder.

When sleep efficiency holds above roughly 85 to 90 percent across a full week. Then add about 15 minutes. Widening on a run of good nights rather than on a week of data is the most common way people stall.

Wake time, always. Fix the rising time to something you can hold seven days a week, then count backwards by the length of your window to find the earliest you may go to bed.

This is not the protocol for either, and it is not appropriate if you have a seizure disorder or bipolar disorder, or if you have significant daytime sleepiness. Those need a clinician first.