There is uncertainty about the effects of treating obstructive sleep apnea on glycemic control in patients with type 2 diabetes.To determine whether treatment of obstructive sleep apnea in patients with type 2 diabetes improves glycemic control.In this trial, we randomized patients with type 2 diabetes and no previous diagnosis of obstructive sleep apnea, with a glycated hemoglobin level of 6.5-8.5%, and an oxygen desaturation index of 15 or more events per hour to positive airway pressure therapy or to usual care.A total of 416 patients met the entry criteria as determined by each site and were randomized. Of the 298 participants who met centrally adjudicated entry criteria, no differences between the study groups were seen for change in glycated hemoglobin. Furthermore, there were no between-group differences when analyses were restricted to those with poorer baseline glycemic control, those with more severe sleep apnea, or those who were adherent to therapy. A greater fall in diastolic blood pressure occurred in the positive airway pressure group than in the usual care group (-3.5 mm Hg vs. -1.5 mm Hg; P = 0.07). This difference was significant in those who were adherent to positive airway pressure therapy (-4.4 mm Hg vs. -1.6 mm Hg; P = 0.02). There was a significant reduction in sleepiness in the positive airway pressure therapy group (P < 0.0001). Quality of life assessment revealed improvements in vitality, mental health, and mental component summary scores in the positive airway pressure therapy group.This trial showed no effect of positive airway pressure therapy on glycemic control in patients with relatively well-controlled type 2 diabetes and obstructive sleep apnea. Clinical trial registered with www.clinicaltrials.gov (NCT00509223).