Obstructive sleep apnea (OSA) affects about 70 % of stroke patients and is closely linked to stroke development. It is unclear whether treatment with continuous positive airway pressure (CPAP) reduces the risk of stroke recurrence or mortality in post-stroke patients, partly due to limited follow-up time and small sample sizes of previous studies. To close this knowledge gap, this study investigated changes in stroke recurrence and mortality among CPAP-treated post-stroke patients with sleep-disordered breathing. We conducted a retrospective cohort study using data from the Danish National Patient Registry covering the period from 2003 to 2016, involving 1821 patients diagnosed with sleep-disordered breathing and a prior ischemic stroke or transient ischemic attack (TIA). Patients were categorized into three groups: CPAP users, CPAP-non-users, and no CPAP treatment. We used Cox hazard regression to assess the risk of recurrent stroke or TIA over a 5-year follow-up period, and all-cause mortality over a 14-year follow-up period. CPAP treatment improved survival rate in CPAP users compared to patients categorized as no CPAP treatment (hazard ratio 0.75, 95 % CI [0.60;0.92], p = 0.007). This effect persisted after adjusting for age, sex, and pre-existing comorbidities within three years (the Quan-updated Charlson Comorbidity Index). There was no difference in recurrence of stroke/TIA among the three CPAP groups. In this registry-based study, we found that CPAP was associated with a reduction in all-cause mortality in post-stroke/TIA patients with sleep-disordered breathing. CPAP treatment did not seem to affect the risk of re-stroke/TIA during the five years of follow-up.