Why Sommelle works the way it does

The app is deliberately simple: one small action a day, little text. This page explains the rest. For each step, you will find what Sommelle does, why, and what it is based on. When a rule is our own choice rather than a study result, we say so.

Health professionals will find the details of the calculations and thresholds in the scientific dossier.

The principles

The morning diary

Each morning, you log your night: bedtime, time to fall asleep, awakenings, rise time, and how it felt. Durations are chosen from simple estimates, such as "15 min" or "30 min".

Why. The diary is the basis of all CBT-I: it is what allows your schedule to be adapted to your real nights. Sommelle uses the reference version used by researchers. Estimates are enough: asking for exact minutes would push you to check the time at night.

The sleep window

After an observation week, Sommelle suggests a bedtime and a rise time. At first, the time spent in bed roughly matches the time you actually sleep, without going below 6 hours. You choose the rise time, the same every day, weekends included; the bedtime follows from it.

Each week, Sommelle compares the time slept with the time spent in bed. If you sleep most of the time you are lying down, the window grows by 15 minutes. If you often lie awake in bed, it shrinks by 15 minutes, never below the minimum. In between, it stays the same.

Why. Spending a long time in bed without sleeping fragments sleep and links the bed with being awake. Reducing this time for a while makes sleep deeper and more continuous; it is then lengthened as sleep consolidates. European guidelines count it among the most effective components of CBT-I (Riemann et al., 2023); it is also the one that takes the most effort.

The precise thresholds (85% and 80% of time in bed spent asleep, 75% and 80% from age 65), the minimum of 6 hours and the maximum of 9 hours are reasoned choices, which we have reviewed by sleep professionals. To put these choices in context: reference manuals use 90% and 85% (Spielman et al., 2011), the 6-hour minimum is a Réseau Morphée (2019) benchmark whereas other protocols accept 5 hours, and we found no source for the 9-hour maximum.

What to expect in the first weeks

In a qualitative study of 23 people following time-in-bed restriction online (Simon et al., 2025), several of those who stopped cited daytime fatigue and said they did not know when the restriction would end; a few people who had been told about the effects said they felt better prepared, though the study cannot show that this prevents dropout. So here is what lies ahead.

When you can't sleep

An "I can't sleep" button opens a dark screen, with no time or numbers, that reminds you what to do: get up, go to another room, do something calm in soft light, and go back to bed when sleep comes. The screen closes by itself.

Why. Lying in bed waiting for sleep pushes it away: the bed ends up being linked with wakefulness and tension. Getting up helps link it with sleep again. This instruction has existed since the 1970s and appears in the European (2023) and American (2021) guidelines.

The exercises

From the second week, an exercise of about five minutes unlocks each week. Each one uses a classic CBT-I technique:

The choice of these five exercises and their order are our own choices.

Why Sommelle sometimes refers you to a doctor

The starting questionnaire spots situations where the sleep window would be risky or unsuitable: snoring with pauses in breathing, falling asleep during the day, bipolar disorder, epilepsy, sleepwalking or night terrors, depression, fall risk or an evening sleeping pill, an unstable health condition, pregnancy, night work, nights interrupted by someone else. Depending on the case, Sommelle does not reduce your time in bed, or advises you to talk to a doctor.

Why. Reducing time in bed causes tiredness at first, which can be dangerous at the wheel or destabilize some illnesses. And some conditions that look like insomnia, such as sleep apnea, are treated differently.

What Sommelle does not do

A comment, a wording that bothers you, a step that does not help you? Write to us at pilmil.studio@proton.me. Sommelle collects no data: your feedback is our only way to improve it.

How the code is written. Sommelle's code is written with the help of an artificial intelligence assistant, then reviewed and maintained by the members of Pilmil Studio, a French non-profit association under the 1901 law. The app itself embeds no artificial intelligence: its rules are fixed and can be checked in the code.

Sources

  1. Riemann D. et al. The European Insomnia Guideline: an update on the diagnosis and treatment of insomnia 2023. J Sleep Res, 2023. doi:10.1111/jsr.14035
  2. Edinger J.D. 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. doi:10.5664/jcsm.8986
  3. Carney C.E. et al. The Consensus Sleep Diary: standardizing prospective sleep self-monitoring. Sleep, 2012. doi:10.5665/sleep.1642
  4. Tang N.K.Y., Schmidt D.A., Harvey A.G. Sleeping with the enemy: clock monitoring in the maintenance of insomnia. J Behav Ther Exp Psychiatry, 2007.
  5. Spielman A.J., Saskin P., Thorpy M.J. Treatment of chronic insomnia by restriction of time in bed. Sleep, 1987.
  6. Spielman A.J., Yang C.-M., Glovinsky P.B. Sleep restriction therapy. In: Behavioral Treatments for Sleep Disorders, Elsevier, 2011, chapter 1. med.upenn.edu
  7. Kyle S.D. et al. Sleep restriction therapy for insomnia is associated with reduced objective total sleep time, increased daytime somnolence, and objectively impaired vigilance. Sleep, 2014. doi:10.5665/sleep.3386
  8. Simon L. et al. Barriers and Facilitators of Sleep Restriction Therapy in Internet-Delivered CBT-I: A Qualitative Content Analysis and the Development of a Treatment Path Model. J Sleep Res, 2025;34(6):e70018. PubMed
  9. Bootzin R.R. Stimulus control treatment for insomnia. Proceedings of the American Psychological Association, 1972.

The sources for the exercises and the full code and formula auditability table (ProtocolConfig.kt, SleepMetrics.kt, SleepWindowCalculator.kt, ScreeningEvaluator.kt) are detailed in the scientific dossier.