Home▸Insomnia & Restless Legs Syndrome▸CBT-I (Cognitive Behavioral Therapy for Insomnia) Simulator

😴 CBT-I (Cognitive Behavioral Therapy for Insomnia) Simulator

A cognitive-behavioral therapy simulator for insomnia that includes mechanisms of sleep restriction and stimulus control to re-establish the association between bed and sleep.

Insomnia & Restless Legs Syndrome2DModerate60 FPS
cbt-insomnia-therapy-simulator ↗ Open standalone

Sleep Restriction Therapy — Compressing Time in Bed

Time in bed is matched to estimated sleep time to build pressure.

  • 5.5 h: Typical starting TIB (placeholder baseline value)
  • 5.0 h: Minimum allowed TIB (placeholder safety floor)
  • Weekly: Review cadence (placeholder schedule)
  • Daily: Sleep diary use (placeholder tracking method)

How restriction builds sleep drive

Placeholder: shorter time in bed concentrates sleep pressure into one block.

Stimulus Control — Re-Pairing Bed With Sleep

The bed becomes a cue for sleep only, not wakefulness or worry.

  • ~20 min: Leave-bed threshold (placeholder awake rule)
  • Fixed daily: Wake time (placeholder anchor)
  • Moved out: Non-sleep activities (placeholder rule)
  • Avoided: Naps (placeholder guidance)

Rules that restore the bed-sleep cue

Placeholder: leaving bed when awake breaks the bed-wakefulness link.

Consolidation — Homeostatic Drive Meets Conditioned Cue

Rising sleep drive and a cleaner cue combine to consolidate sleep.

  • Nightly: Drive buildup (placeholder mechanism)
  • Rises weekly: Association strength (placeholder trend)
  • Decreases: Fragmentation (placeholder trend)
  • Increases: Deep sleep (placeholder trend)

Why consolidation follows restriction

Placeholder: less broken sleep concentrates into a denser, sounder block.

Sleep Efficiency Climbing Across the Program

Efficiency trends upward week over week with adherence.

  • ~65%: Week 1 efficiency (placeholder starting value)
  • ~90%: Week 8 target (placeholder goal value)
  • Sleep / TIB: Efficiency formula (placeholder ratio)
  • Accelerates gain: Adherence effect (placeholder note)

Tracking the efficiency curve

Placeholder: efficiency is charted weekly against the adherence level.

Titrating Time in Bed Back Upward

Once efficiency is high, time in bed is extended in small steps.

  • +15–20 min: Extension step (placeholder increment)
  • Efficiency >85%: Trigger threshold (placeholder rule)
  • Weekly: Reassessment (placeholder cadence)
  • ~7.5–8 h: End goal TIB (placeholder target)

Safely widening the sleep window

Placeholder: extension only proceeds while efficiency stays high.

Placeholder: gains are protected by extending time in bed gradually.
⚙ Under the hood

A cognitive-behavioral therapy simulator for insomnia that includes mechanisms of sleep restriction and stimulus control to re-establish the association between bed and sleep.

CanvasBiomedicine

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)