Evidence for the role of sleep on metabolic and endocrine function has been reported more than four decades ago. In the past 30 years, the prevalence of obesity and diabetes has greatly increased in industrialized countries, and self-imposed sleep curtailment, now very common, is starting to be recognized as a contributing factor, alongside with increased caloric intake and decreased physical activity. Furthermore, obstructive sleep apnea, a chronic condition characterized by recurrent upper airway obstruction leading to intermittent hypoxemia and sleep fragmentation, has also become highly prevalent as a consequence of the epidemic of obesity and has been shown to contribute, in a vicious circle, to the metabolic disturbances observed in obese patients. In this article, we summarize the current data supporting the role of sleep in the regulation of glucose homeostasis and the hormones involved in the regulation of appetite. We also review the results of the epidemiologic and laboratory studies that investigated the impact of sleep duration and quality on the risk of developing diabetes and obesity, as well as the mechanisms underlying this increased risk. Finally, we discuss how obstructive sleep apnea affects glucose metabolism and the beneficial impact of its treatment, the continuous positive airway pressure. In conclusion, the data available in the literature highlight the importance of getting enough good sleep for metabolic health.