Repository logo

Detecting sleep outside the clinic using wearable heart rate devices.

Published version



Change log


Perez-Pozuelo, Ignacio 
Posa, Marius 
Spathis, Dimitris 


The adoption of multisensor wearables presents the opportunity of longitudinal monitoring of sleep in large populations. Personalized yet device-agnostic algorithms can sidestep laborious human annotations and objectify cross-cohort comparisons. We developed and tested a heart rate-based algorithm that captures inter- and intra-individual sleep differences in free-living conditions and does not require human input. We evaluated it on four study cohorts using different research- and consumer-grade devices for over 2000 nights. Recording periods included both 24 h free-living and conventional lab-based night-only data. We compared our optimized method against polysomnography, sleep diaries and sleep periods produced through a state-of-the-art acceleration based method. Against sleep diaries, the algorithm yielded a mean squared error of 0.04-0.06 and a total sleep time (TST) deviation of [Formula: see text]2.70 (± 5.74) and 12.80 (± 3.89) minutes, respectively. When evaluated with PSG lab studies, the MSE ranged between 0.06 and 0.11 yielding a time deviation between [Formula: see text]29.07 and [Formula: see text]55.04 minutes. These results showcase the value of this open-source, device-agnostic algorithm for the reliable inference of sleep in free-living conditions and in the absence of annotations.



Heart Rate, Humans, Polysomnography, Reproducibility of Results, Sleep, Wearable Electronic Devices

Journal Title

Scientific Reports

Conference Name

Journal ISSN


Volume Title



Nature Publishing Group
Engineering and Physical Sciences Research Council (EP/N509620/1)
National Institute for Health and Care Research (IS-BRC-1215-20014)
MRC (MC_UU_00006/1)
Cambridge University Hospitals NHS Foundation Trust (CUH) (146281)
MRC (MC_UU_00006/4)
Is derived from: