← Back to MedBug MedBug insights

Sleep, decoded
without a wire in sight

MEDBUG, a mattress-based sensor strip, watches your breathing and body motion overnight and hands the pattern to a deep-learning model trained to think in sleep stages — no electrodes, no wearable, no missed night.

MedBug sleep-staging method overview: mattress sensing to overnight stage output
67.5%
4-stage accuracy vs PSG
κ 0.50
Cohen's kappa, moderate–strong agreement
0.88
Overall AUC across four sleep stages
78.5%
Sensitivity for detecting REM sleep

The Problem With One Good Night

Sleep quality swings from night to night — which means a single night of lab-based polysomnography (PSG), the clinical gold standard, can misjudge a person's real sleep. Multi-night tracking with consumer devices suggests up to 20% of sleep apnoea cases get misdiagnosed, and half get the wrong severity rating, when judged on one night instead of two weeks.

PSG is accurate but impractical to repeat: it's wired, lab-bound, and expensive to score. Wearables solve the repeatability problem but introduce their own — skin contact, compliance, motion artifacts. MEDBUG tries a third path: a completely non-contact strip under the mattress cover, reading ballistocardiographic (BCG) signals — the tiny mechanical push of every heartbeat and breath — alongside body pressure and ambient light.

"This approach demonstrates robust agreement with gold-standard PSG, with similar or greater performance compared to other non-contact and wearable technologies." — According to Lead Algorithm Engineer Cham Nguyen

Where The Model Shines — And Where It Struggles

Tested against expert-scored PSG in 60 independent participants, the four-stage classifier (Wake, Light, Deep, REM) was strongest at telling REM sleep and wakefulness apart from everything else, and comparatively weaker at pinning down light sleep — a transitional stage whose signal genuinely overlaps its neighbours.

WAKE
75.1%
REM
78.5%
DEEP
65.4%
LIGHT
50.9%
Sensitivity per stage — share of true epochs correctly detected

The bias runs in one direction: the model tends to read light sleep as REM or deep sleep, overestimating REM by about 40 minutes a night and underestimating light sleep by roughly 68 minutes. Total sleep time and sleep efficiency, by contrast, track PSG closely — the correlation for total sleep time was r = 0.78 with essentially no systematic bias (−2.6 min).

Built On A Pretrained Sleep Brain

Under the hood, an 8-layer Transformer sits on top of a VGG-style convolutional encoder — pretrained on a large internal dataset, then fine-tuned on just 60 recordings for this study. Three-minute input windows let it reason across long stretches of the night rather than judging each 30-second epoch in isolation, which helps it track the slow architecture of NREM/REM cycling.

What's in the strip

  • 1 piezoelectric sensor — reads cardiorespiratory motion (BCG), 200 Hz
  • 3 static pressure sensors — body position, in/out-of-bed status, 20 Hz
  • 12-channel light sensor — marks lights-off / lights-on, 1 Hz
  • Mic + environmental sensors — temperature, humidity, air quality
  • All positioned under the mattress cover, at mid-chest level, to dodge partner interference

How It Stacks Up

Against other mattress-based (BCG/piezo) sleep trackers validated in published studies:

StudyAcc.REM sens.
Ding et al. 202275%80.0%
MEDBUG67.5%78.5%
Tal et al. 201764%53.7%
Stefanos et al. 202563.1%53.0%
Manners et al. 202462.8%70.0%
Kholghi et al. 202240%45.7%
Wearables for comparison typically report 54–65% accuracy; camera- and radar-based systems report higher accuracy (75–81%) but carry privacy or lighting constraints.

The Cohort

120 clinic-referred adults, split 60/60 into training and independent test sets. Mean age 49.7 ± 22.2y, 66% male, BMI 28.6 ± 5.3, AHI 19.9 ± 20.0 events/h. Notably, model agreement with PSG held steady regardless of a participant's age, BMI, or OSA severity (all p > 0.7).