To test the hypothesis that obstructive sleep apnea (OSA) is a risk factor for development of postoperative atrial fibrillation (POAF) after cardiac surgery. Retrospective analysis. Single-center university hospital. Five hundred forty-five patients in sinus rhythm preoperatively undergoing coronary artery bypass grafting (CABG), aortic valve replacement, mitral valve replacement/repair, or combined valve/CABG surgery from January 2008 to April 2011. Retrospective review of medical records. Postoperative atrial fibrillation was defined as atrial fibrillation requiring therapeutic intervention. Of 545 cardiac surgical patients, 226 (41%) patients developed POAF. The risk was higher in 72 OSA patients than 473 patients without OSA (67% v 38%, adjusted hazard ratio 1.83 [95% CI: 1.30-2.58], p<0.001). Of the 32 OSA patients who used home positive airway pressure (PAP) therapy, 18 (56%) developed POAF compared with 29 of 38 (76%) patients who did not use PAP at home (unadjusted hazard ratio 0.63 [95% CI: 0.35-1.15], p = 0.13). OSA is significantly associated with POAF in cardiac surgery patients. Further investigation is needed to determine whether or not use of positive airway pressure in OSA patients reduces the risk of POAF.