Background: Sleep problems are known as risk factors for depression and anxiety, but research on this subject with commercial pilots is limited. This study aimed to explore the effects of sleep problems on depressive and anxiety symptoms among Chinese commercial pilots.Methods: Adults who participated in the baseline assessment of the Civil Aviation Health Cohort of China between December 2022 and March 2023 formed the study sample. Depressive and anxiety symptoms and sleep quality were assessed using standardized scales. Sleep duration was measured with standardized questions. Logistic regression and restricted cubic splines (RCSs) were used to analyze the association between sleep problems and depression/anxiety symptoms.Results: A total of 7055 pilots were included in this study. The overall prevalence of depression and anxiety among pilots was 23.3% (n = 1642; 95% confidence interval [CI] = 22.3%–24.3%) and 17.0% (n = 1196; 95% CI = 16.1–17.8%), respectively. Logistic regression analyses revealed that short sleep duration (<7 h) was significantly associated with a higher risk of depression (odds ratio [OR] = 2.491; p < 0.001) and anxiety (OR = 2.555; p < 0.001), while poor sleep quality was also associated with a higher risk of depression (OR = 7.297; p < 0.001) and anxiety (OR = 7.469; p < 0.001). After adjusting for confounders, there was an inverse, J‐shaped nonlinear relationship between sleep duration and both depression (inflection point: 7.64 h) and anxiety (inflection point: 7.48 h). Similarly, a J‐shaped nonlinear relationship was found between sleep quality and depression/anxiety with an inflection point of Pittsburgh Sleep Quality Index (PSQI) = 4 points for both. The major limitation of the study was that causal relationships between variables could not be inferred due to the cross‐sectional study design.Conclusion: This study found that depression and anxiety were common among Chinese commercial pilots. Insufficient length and poor quality of sleep were associated with an increased risk of depression and anxiety. Implementing targeted strategies to improve sleep patterns is crucial for reducing the risk of depression and anxiety in this population.