The hypothalamic-pituitary-adrenal (HPA) axis plays important roles in maintaining alertness and modulating sleep. Dysfunction of this axis at any level (CRH receptor, glucocorticoid receptor, or mineralocorticoid receptor) can disrupt sleep. Herein, we review normal sleep, normal HPA axis physiology and circadian rhythm, the effects of the HPA axis on sleep, as well as the effects of sleep on the HPA axis. We also discuss the potential role of CRH in circadian-dependent alerting, aside from its role in the stress response. Two clinically relevant sleep disorders with likely HPA axis dysfunction, insomnia and obstructive sleep apnea, are discussed. In insomnia, we discuss how HPA axis hyperactivity may be partially causal to the clinical syndrome. In obstructive sleep apnea, we discuss how HPA axis hyperactivity may be a consequence of the disorder and contribute to secondary pathology such as insulin resistance, hypertension, depression, and insomnia. Mechanisms by which cortisol can affect slow wave sleep are discussed, as is the role the HPA axis plays in secondary effects of primary sleep disorders.