Objectives: Comorbid depression is a highly prevalent and debilitating condition in middle-aged and elderly adults, particularly when associated with obesity, diabetes, and sleep disturbances. In this context, there is a growing need to develop efficient screening methods for cases based on clinical health markers for these comorbidities and sleep data. Thus, our objective was to detect depressive symptoms in these subjects, considering general biomarkers of obesity and diabetes and variables related to sleep and physical exercise through a machine learning approach. Methods: We used the National Health and Nutrition Examination Survey (NHANES) 2015–2016 data. Eighteen variables on self-reported physical activity, self-reported sleep habits, sleep disturbance indicative, anthropometric measurements, sociodemographic characteristics and plasma biomarkers of obesity and diabetes were selected as predictors. A total of 2907 middle-aged and elderly subjects were eligible for the study. Supervised learning algorithms such as Lasso penalized Logistic Regression (LR), Random Forest (RF) and Extreme Gradient Boosting (XGBoost) were implemented. Results: XGBoost provided greater accuracy and precision (87%), with a proportion of hits in cases with depressive symptoms above 80%. In addition, daytime sleepiness was the most significant predictor variable for predicting depressive symptoms. Conclusions: Sleep and physical activity variables, in addition to obesity and diabetes biomarkers, together assume significant importance to predict, with accuracy and precision of 87%, the occurrence of depressive symptoms in middle-aged and elderly individuals.