A robust, bistable switch regulates the fluctuations between wakefulness and natural sleep as well as those between wakefulness and anesthetic-induced unresponsiveness. We previously provided experimental evidence for the existence of a behavioral barrier to transitions between these states of arousal, which we call neural inertia. Here we show that neural inertia is controlled by processes that contribute to sleep homeostasis and requires four genes involved in electrical excitability: Sh, sss, na and unc79. Although loss of function mutations in these genes can increase or decrease sensitivity to anesthesia induction, surprisingly, they all collapse neural inertia. These effects are genetically selective: neural inertia is not perturbed by loss-of-function mutations in all genes required for the sleep/wake cycle. These effects are also anatomically selective: sss acts in different neurons to influence arousal-promoting and arousal-suppressing processes underlying neural inertia. Supporting the idea that anesthesia and sleep share some, but not all, genetic and anatomical arousal-regulating pathways, we demonstrate that increasing homeostatic sleep drive widens the neural inertial barrier. We propose that processes selectively contributing to sleep homeostasis and neural inertia may be impaired in pathophysiological conditions such as coma and persistent vegetative states.