Abstract Background A growing body of epidemiological and clinical research has uncovered a significant relationship between sleep apnea and the exacerbation of cardiovascular outcomes, notably myocardial infarction, stroke, and cardiac death. Individuals diagnosed with coronary artery disease (CAD) alongside sleep apnea are identified to have a heightened likelihood of experiencing recurrent cardiovascular events. Despite these associations, the link between sleep apnea and an elevated risk of mortality among CAD patients remains insufficiently explored. Purpose Our study aims to shed light on the impact of sleep apnea on mortality rates within this patient population, potentially guiding future therapeutic strategies. Methods Our cohort study leveraged data from the TriNetX multinational electronic health record network, focusing on patients aged 18 and above diagnosed with coronary artery disease. Participants were stratified into two groups based on the diagnosis of sleep apnea. To ensure a fair comparison, we adjusted for prevalent risk factors such as hypertension, diabetes, dyslipidemia, obesity, and chronic kidney disease, which are commonly observed in CAD patients. Results The study encompassed 1,799,812 patients, equally divided into two groups of 899,906 individuals each, one with sleep apnea and the other without. Over a 5-year observation period, the primary endpoint, defined as event-free survival, was significantly lower in the sleep apnea group (74.385%) compared to the non-sleep apnea group (76.606%), with a Log Rank confidence interval of 1.128 to 1.148 and a p-value of <0.0001. This outcome highlights a association between sleep apnea and increased mortality rates in CAD patients. Conclusion The findings from our large cohort study underscore the critical impact of sleep apnea on mortality among patients with coronary artery disease. The diagnosis of sleep apnea in CAD patients within the TriNetX cohort was significantly associated with a higher mortality rate over a span of five years. These insights emphasize the need for integrated care strategies that not only address the primary cardiovascular conditions but also prioritize the diagnosis and management of sleep apnea to potentially improve survival outcomes in this vulnerable patient group. Our study calls for heightened clinical awareness and further research to elucidate the mechanisms behind this association and to explore the benefits of targeted sleep apnea interventions in reducing mortality rates among CAD patients.5-year Kaplan-Meier curves for mortality