Obstructive sleep apnea (OSA) and type 2 diabetes confer increasing economic, social, and public health burdens in the United States. That these diseases appear to co-exist and together increase one's risk of cardiovascular disease renders investigation into their shared pathophysiology even more urgent. Investigators will assess prevalence of insulin resistance, a precursor to diabetes, among overweight patients with OSA. Among those at highest risk of diabetes, investigators will randomize participants to pioglitazone or placebo to see the efficacy of the intervention on improving OSA, insulin resistance, and/or insulin secretion. In a separate intervention, investigators will evaluate the cardiometabolic benefits of continuous positive airway pressure (CPAP) for 12 weeks in patients with OSA. Investigators will also study subjects from the community without known sleep apnea, and assess whether insulin-resistant individuals are at risk for sleep apnea using clinical screening questionnaires.