%0 Journal Article %@ 2561-326X %I JMIR Publications %V 9 %N %P e65000 %T Personalized Physician-Assisted Sleep Advice for Shift Workers: Algorithm Development and Validation Study %A Shen,Yufei %A Choto Olivier,Alicia %A Yu,Han %A Ito-Masui,Asami %A Sakamoto,Ryota %A Shimaoka,Motomu %A Sano,Akane %+ Rice University, 6100 Main St., Houston, TX, 77005, United States, 1 7133483821, akane.sano@rice.edu %K cognitive behavioral therapy %K CBT %K health care workers %K machine learning %K medical safety %K web-based intervention %K app-based intervention %K shift work %K shift work sleep disorders %K shift workers %K sleep disorder %K wearable sensors %K well-being %D 2025 %7 1.4.2025 %9 Original Paper %J JMIR Form Res %G English %X Background: In the modern economy, shift work is prevalent in numerous occupations. However, it often disrupts workers’ circadian rhythms and can result in shift work sleep disorder. Proper management of shift work sleep disorder involves comprehensive and patient-specific strategies, some of which are similar to cognitive behavioral therapy for insomnia. Objective: Our goal was to develop and evaluate machine learning algorithms that predict physicians’ sleep advice using wearable and survey data. We developed a web- and app-based system to provide individualized sleep and behavior advice based on cognitive behavioral therapy for insomnia for shift workers. Methods: Data were collected for 5 weeks from shift workers (N=61) in the intensive care unit at 2 hospitals in Japan. The data comprised 3 modalities: Fitbit data, survey data, and sleep advice. After the first week of enrollment, physicians reviewed Fitbit and survey data to provide sleep advice and selected 1 to 5 messages from a list of 23 options. We handcrafted physiological and behavioral features from the raw data and identified clusters of participants with similar characteristics using hierarchical clustering. We explored 3 models (random forest, light gradient-boosting machine, and CatBoost) and 3 data-balancing approaches (no balancing, random oversampling, and synthetic minority oversampling technique) to predict selections for the 7 most frequent advice messages related to bedroom brightness, smartphone use, and nap and sleep duration. We tested our predictions under participant-dependent and participant-independent settings and analyzed the most important features for prediction using permutation importance and Shapley additive explanations. Results: We found that the clusters were distinguished by work shifts and behavioral patterns. For example, one cluster had days with low sleep duration and the lowest sleep quality when there was a day shift on the day before and a midnight shift on the current day. Our advice prediction models achieved a higher area under the precision-recall curve than the baseline in all settings. The performance differences were statistically significant (P<.001 for 13 tests and P=.003 for 1 test). Sensitivity ranged from 0.50 to 1.00, and specificity varied between 0.44 and 0.93 across all advice messages and dataset split settings. Feature importance analysis of our models found several important features that matched the corresponding advice messages sent. For instance, for message 7 (darken the bedroom when you go to bed), the models primarily examined the average brightness of the sleep environment to make predictions. Conclusions: Although our current system requires physician input, an accurate machine learning algorithm shows promise for automatic advice without compromising the trustworthiness of the selected recommendations. Despite its decent performance, the algorithm is currently limited to the 7 most popular messages. Further studies are needed to enable predictions for less frequent advice labels. %R 10.2196/65000 %U https://formative.jmir.org/2025/1/e65000 %U https://doi.org/10.2196/65000