Clinically significant anxiety (CSA) is common in individuals with short-term insomnia. This study aims to explore the relationship between CSA and the subjective and objective parameters of sleep in patients with short-term insomnia and construct machine learning (ML) models to determine the utility of accelerometer features in identifying significant anxiety. A total of 205 short-term insomnia participants from China were assigned to the group with CSA (N = 33) or the group without CSA (N = 172). Interaction analysis based on linear regression was used to estimate the possible interactive effect of accelerometer features between CSA and sleep problems. Four feature sets and eight algorithms were used to construct ML models, with Shapley Additive exPlanations (SHAP) values used to visualize feature importance and influence processes. CSA in patients with short-term insomnia leads to more severe subjective sleep problems, and accelerometer-measured features warrant further attention for the identification of interactive factors. A significant interaction effect was found between anxiety symptoms and longer duration of physical activity on insomnia severity (Pinteraction < 0.05). Anxiety symptoms and interdaily stability had an interactive association with sleep hygiene behaviors (Pinteraction < 0.01). ML can process and analyze complex accelerometer features to identify CSA in patients with short-term insomnia. Compared with other feature sets and algorithms, the XGBoost model with accelerometer-measured features on weekdays more effectively identified CSA with area under the curve (AUC) value of 0.777. SHAP analysis results indicated that circadian rhythm features had significant contributions. Decision plots based on SHAP were applied to visualize the personalized risk factors for each patient and provide clinicians with more easily understandable and practical explanation methods that enhance clinical decision-making.
Trial Registration: Chinese Clinical Trial Registry identifier: ChiCTR2200062910