Skip to content
Pricing FAQ About Contact MyBodyAI

Tonight's sleep goal and bedtime

Updated 8 min read

Short answer

Tonight's sleep goal is your sleep need plus a part of your Sleep Debt, rounded to the half hour. The advised bedtime is worked back from your wake time, with the time you usually lie awake and a small shift for debt. We print a clock time only when we can stand behind the wake time behind it.

  • With a debt over 1 hour, the goal adds 35% of it to your need, at most 1.5 hours more.
  • The bedtime moves 18 minutes earlier for each hour of debt, at most 1 hour earlier.
  • The wake time is the one you set under "Schedule", otherwise the average of your measured wake times when they agree well enough.
  • Without a trustworthy wake time the card gives hours of sleep, not a clock time.
On this page
  1. Tonight's goal and the bedtime advice
  2. Frequently asked questions

Tonight's goal and the bedtime advice#

Tonight's sleep goal#

Tonight's goal is your need plus a part of your debt:

  • With a debt of 1 hour or less, the goal is your need rounded to the nearest half hour.
  • Above 1 hour, the goal is your need plus 35% of the debt, at most 1.5 hours more than the need, and the result is rounded to the nearest half hour.
NeedDebtTonight's goal
7h 30m1 h7h 30m
7h 30m1.5 h8 h
7h 30m3 h8h 30m
7h 30m4.5 h or more9 h

You see this goal as "Sleep goal" ("Cíl spánku") among your daily goals, in the sleep tips, and in the advice of Body Status on an Alert or Recovering day ("... and 7h 30m of sleep tonight"). The goal is a number of hours of sleep. It is not an instruction to lie in bed for that long.

The advised bedtime#

The bedtime is a clock time worked out backward from your wake time:

bedtime = wake time − need ÷ efficiency − debt shift

  • Wake time: see the next section.
  • Need ÷ efficiency: your need is time asleep, but a bed holds some time awake. We take your own median efficiency over the last 30 days (sleep length divided by the time from bedtime to wake time), from nights that have both clock times, a window of 3 to 16 hours and no more sleep than window. It needs at least 7 such nights, otherwise we assume 100%. It is kept between 85% and 100%, so a poor sleeper is never told to lie in bed longer than a good sleeper would need.
  • Debt shift: 0.3 hours (18 minutes) for each hour of debt, at most 1 hour. A reserve or no debt shifts nothing. We stop at an hour because the evening hours just before your usual bedtime are the hardest to fall asleep in (Lavie 1986), so a much earlier bedtime mostly buys time awake in bed.

When the shift is not zero, the evening card says so: "Aim to be in bed around 22:42", "From your data (wake ~06:30). 18 min earlier to pay back your sleep debt." When the bedtime includes time you lie awake (15 minutes or more), it adds "Including the time you lie awake."

Example

You wake around 06:30 and your need is 7h 30m.

  • No debt, efficiency 100%: 06:30 − 7h 30m = 23:00.
  • No debt, your median efficiency is 90%: the time in bed is 7.5 ÷ 0.9 = 8h 20m, so 22:10.
  • Debt 1 h, efficiency 100%: shift 18 minutes, 22:42.
  • Debt 3.3 h or more, efficiency 100%: the shift reaches its limit of 1 hour, 22:00. With efficiency 90% it is 21:10.

The Body Clock card draws your rhythm's window from the same wake time and need but without the debt shift, because that window describes your rhythm, not tonight's repayment (see Body Clock).

Which wake time we use#

  1. A fixed wake time you set always wins (setting your own schedule).
  2. Otherwise we read your measured wake times from the last 60 days. We take the wake times of the same weekday as the morning you are heading for when we have at least 3 of them, otherwise all days, and average them round the clock, so a wake around midnight does not give nonsense.
  3. With neither, we use 06:00, and then we do not print a bedtime.

How sure we are depends on the nights we averaged. Seven or more nights that agree to within about an hour are high confidence. Four or more that agree to within about two hours are medium. Anything looser is low.

When we show a bedtime#

We print a clock time only when we can stand behind its wake time: you set it yourself, or it comes from your own nights with high or medium confidence. Otherwise the card says "Aim for ~7h 30m of sleep" with "Set your wake time for an exact bedtime." The same rule decides what the Progress tab, the energy map and the bedtime mission print, so the app never states one time on one tab and none on another. An account that has never recorded a night gets no bedtime at all, instead of a made-up 22:30.

Shift work and changing clocks#

An average of wake times breaks for people whose weeks are not weeks. When your wake times fall into two or three habits (an early shift, a free-day wake, a wake after a night shift), we look for a cycle of 1 to 28 days that repeats them:

  • It needs at least 8 nights, and each habit must have at least 3 nights behind it.
  • The cycle must match your nights at least 75% of the time and beat "always the commonest habit" by at least 15 points, and it needs two full cycles of evidence. Otherwise we keep the plain average rather than a confident wrong guess.
  • A date's habit is the vote of the same place in the previous one to four cycles (at least 60% of the vote). Its wake and bedtime are the recent averages of that habit's own nights, with newer nights weighing more (the weight halves every 21 days).
  • A bedtime between 05:00 and 15:00, the sleep after a night shift, is kept as it is instead of being set to wake minus the need.

When your newest nights agree with each other and sit three hours or more away from the older ones (a new job, a new time zone), the newer clock replaces the older history, so the advice follows your new life within days. A smaller change needs about a week. A bedtime you plan for the night on the energy map (the day plan) replaces the advised one.

Setting your own schedule#

On the Sleep tab, the evening card has a button "Schedule" ("Čas spánku"). It opens "Sleep schedule" ("Spánkový režim") with the question "Which wake time anchors your bedtime":

  • "Automatic" ("Automaticky"): "We estimate your wake time from your measured nights."
  • "Fixed time" ("Pevný čas"): you enter "Wake" ("Vstávám") and, optionally, "Bed (optional)" ("Uléhám (nepovinné)") as HH:MM. The wake time then anchors the advised bedtime. The optional bed time is used for the sleep window drawn on the energy map.

After you save, the Sleep tab loads again with the new anchor.

Frequently asked questions#

Why does the app ask for a different bedtime than I keep?#

The advised bedtime is your wake time minus your need, divided by your own efficiency, minus up to one hour for a debt. If you keep your usual bedtime and owe sleep, the advice is earlier than your habit by design, and the card says how many minutes are for the debt. The Body Clock card compares you with your rhythm bedtime, which has no debt shift in it.

Why is there no bedtime on my card?#

We print a bedtime only when we trust its wake time: you fixed one, or we have at least 4 recorded nights (of the same weekday, or of all days) that agree to within about 2 hours. Until then you see a sleep goal in hours instead. Recording a few nights, or setting a "Fixed time" in the sleep schedule, brings the bedtime back.

Why is tonight's sleep goal longer than my sleep need?#

When your debt is over 1 hour, the goal is your need plus 35% of the debt, at most 1.5 hours more than the need, rounded to the nearest half hour. With a debt of 1 hour or less the goal is your need. The goal is a number of hours of sleep, not an instruction to lie in bed for that long. See Tonight's sleep goal.

How do I set my own wake time?#

On the Sleep tab, press "Schedule" on the evening card, choose "Fixed time" and enter "Wake" as HH:MM. A fixed wake time you set always wins over the measured ones. The optional "Bed (optional)" time is used for the sleep window drawn on the energy map. See Setting your own schedule.

Did this page answer your question?

Thresholds, windows and calculations in the Encyclopedia are tied to the app's code by an automatic test: when one changes in the app, the test makes us correct the entry. MyBodyAI is a wellness app, not a medical device. It does not diagnose. If you feel unwell, ask a doctor.

Encyclopedia contents

Getting started

Data and devices

Health

Sleep

Training

Modes and account