Sleep apnea (SA) is associated with an increased risk of atrial fibrillation (AF). We sought to determine the effect of SA on cardiac structure in patients with AF, whether therapy for SA was associated with beneficial cardiac structural remodelling, and whether beneficial cardiac structural remodelling translated into a reduced risk of recurrence of AF after pulmonary venous isolation (PVI).A consecutive group of 720 patients underwent a cardiac magnetic resonance study before PVI. Patients with SA (n=142, 20%) were more likely to be male, diabetic, and hypertensive and have an increased pulmonary artery pressure, right ventricular volume, atrial dimensions, and left ventricular mass. Treated SA was defined as duration of continuous positive airway pressure therapy of >4 hours per night. Treated SA patients (n=71, 50%) were more likely to have paroxysmal AF, a lower blood pressure, lower ventricular mass, and smaller left atrium. During a follow-up of 42 months, AF recurred in 245 patients. The cumulative incidence of AF recurrence was 51% in patients with SA, 30% in patients without SA, 68% in patients with untreated SA, and 35% in patients with treated SA. In a multivariable model, the presence of SA (hazard ratio 2.79, CI 1.97 to 3.94, P<0.0001) and untreated SA (hazard ratio 1.61, CI 1.35 to 1.92, P<0.0001) were highly associated with AF recurrence.Patients with SA have an increased blood pressure, pulmonary artery pressure, right ventricular volume, left atrial size, and left ventricular mass. Therapy with continuous positive airway pressure is associated with lower blood pressure, atrial size, and ventricular mass, and a lower risk of AF recurrence after PVI.