Recent advances in sleep neurobiology have allowed development of physiologically based mathematical models of sleep regulation that account for the neuronal dynamics responsible for the regulation of sleep-wake cycles and allow detailed examination of the underlying mechanisms. Neuronal systems in general, and those involved in sleep regulation in particular, are noisy and heterogeneous by their nature. It has been shown in various systems that certain levels of noise and diversity can significantly improve signal encoding. However, these phenomena, especially the effects of diversity, are rarely considered in the models of sleep regulation. The present paper is focused on a neuron-based physiologically motivated model of sleep-wake cycles that proposes a novel mechanism of the homeostatic regulation of sleep based on the dynamics of a wake-promoting neuropeptide orexin. Here this model is generalized by the introduction of intrinsic diversity and noise in the orexin-producing neurons, in order to study the effect of their presence on the sleep-wake cycle. A simple quantitative measure of the quality of a sleep-wake cycle is introduced and used to systematically study the generalized model for different levels of noise and diversity. The model is shown to exhibit a clear diversity-induced resonance: that is, the best wake-sleep cycle turns out to correspond to an intermediate level of diversity at the synapses of the orexin-producing neurons. On the other hand, only a mild evidence of stochastic resonance is found, when the level of noise is varied. These results show that disorder, especially in the form of quenched diversity, can be a key-element for an efficient or optimal functioning of the homeostatic regulation of the sleep-wake cycle. Furthermore, this study provides an example of a constructive role of diversity in a neuronal system that can be extended beyond the system studied here.