
A mattress sensor that reads your breathing can tell REM from NREM sleep
Lead. A sensor placed under the mattress, requiring no wires, belts, or contact with the sleeper, can distinguish REM from NREM sleep with about 84% accuracy, according to a new study published in Frontiers in Digital Health. The research, led by Shaonan Wang and colleagues, introduces a method that combines body-movement detection with a sophisticated measure of breathing pattern stability to improve the notoriously difficult task of non-contact sleep staging.
What they found
The researchers tested their approach on 85 adults who underwent simultaneous recordings with both a clinical polysomnography (PSG) setup and a commercial under-mattress piezoelectric sensor strip. Piezoelectric sensors convert mechanical pressure, in this case the force of breathing and body movements transmitted through the mattress, into electrical signals. After excluding wake epochs, the team classified each 30-second epoch as either REM or NREM sleep.
The XGBoost classifier achieved a mean accuracy of 84.39% (plus or minus 12.76 percentage points across subjects) with a Cohen’s Kappa of 0.524, indicating moderate agreement beyond chance. REM sleep proved harder to identify than NREM: REM precision was 0.600, REM recall was 0.735, and the REM F1-score was 0.603.
The key innovation was adding a feature based on the Time Warp Edit Distance (TWED), a method that quantifies the similarity between sequences of respiratory intervals. By measuring how stable or variable a person’s breathing pattern is across different timescales, the TWED-based features improved both the Kappa and REM F1-score compared to using conventional body-movement and respiratory variability features alone. In other words, REM sleep’s characteristically irregular breathing provides a useful signal that conventional metrics miss.
The piezoelectric sensor’s derived respiration rate also showed good agreement with the airflow signal from a nasal cannula (the PSG reference), validating that the under-mattress setup captures clinically meaningful breathing data.
Why it matters
Polysomnography remains the gold standard for sleep staging, but it is expensive, requires an overnight stay in a sleep lab, and involves a tangle of wires, electrodes, and sensors attached to the head, face, chest, and legs. This burden limits its use for repeated or longitudinal monitoring.
Non-contact sleep monitoring is attractive precisely because it eliminates that burden. A strip under the mattress collects data passively, night after night, with no effort from the sleeper. The challenge has been that without electroencephalography (EEG), the brain-wave recordings that define sleep stages, distinguishing REM from NREM is much harder. The two stages differ subtly in their breathing and movement signatures, and past attempts at non-contact REM/NREM discrimination have struggled with reliability.
This study adds to the evidence that breathing analysis, especially measures of respiratory stability, can serve as a viable proxy for the EEG-based sleep-stage distinctions that clinical PSG provides. If methods like this continue to improve, home-based sleep monitoring could become practical for tracking sleep disorders, monitoring treatment response, and flagging longitudinal changes, all without the cost and inconvenience of repeated lab visits.
Limits
Several limitations temper the findings. First, the study excluded epochs scored as wake, so the classifier does not distinguish wake from sleep, a separate and important challenge. Second, the 84% accuracy and 0.524 Kappa, while promising, are not yet at diagnostic grade. REM precision of 0.600 means that 40% of epochs the model labeled as REM were actually NREM, which would distort clinical assessments of REM-related parameters like REM latency or REM density.
Third, the study used a single type of piezoelectric sensor strip and a specific mattress setup; performance may differ with other hardware or mattress types. Fourth, the cohort size of 85 subjects is modest for machine learning studies, and per-subject variability was substantial (accuracy ranged widely, as reflected in the 12.76 percentage-point standard deviation). The nested leave-one-out cross-validation design helps guard against overfitting, but larger and more diverse samples are needed to confirm generalizability.
Finally, the authors note that at current performance levels the method is better viewed as a low-burden adjunctive tool for offline whole-night longitudinal monitoring and trend assessment in home-like settings, not as a replacement for PSG-based clinical diagnosis.
Bottom line
An under-mattress piezoelectric sensor, combined with conventional body-movement features and novel TWED-based respiratory stability measures, can discriminate REM from NREM sleep with moderate accuracy. The breathing-instability signal that TWED captures appears to add meaningful information beyond simpler metrics, pointing to a path toward practical, non-contact sleep staging for home use. For now, the approach is best suited to trend monitoring and longitudinal tracking rather than standalone clinical decision-making.
Source
Wang S, Yu J, Yang X, Liu D, Bai Q, Yu J, Ding S, Xu Y, Zhu D. Non-contact REM/NREM sleep staging from piezoelectric signals using respiratory and body-movement features with auxiliary TWED-based respiratory stability measures. Front Digit Health. 2026 Jun 15;8:1780166. doi:10.3389/fdgth.2026.1780166. PMID: 42375153. PMCID: PMC13310895.
Source URL: https://pubmed.ncbi.nlm.nih.gov/42375153/

