The neural underpinnings of sleep involve interactions between sleep-promoting areas such as the anterior hypothalamus, and arousal systems located in the posterior hypothalamus, the basal forebrain and the brainstem. Hypocretin (Hcrt, also known as orexin)-producing neurons in the lateral hypothalamus are important for arousal stability, and loss of Hcrt function has been linked to narcolepsy. However, it is unknown whether electrical activity arising from Hcrt neurons is sufficient to drive awakening from sleep states or is simply correlated with it. Here we directly probed the impact of Hcrt neuron activity on sleep state transitions with in vivo neural photostimulation, genetically targeting channelrhodopsin-2 to Hcrt cells and using an optical fibre to deliver light deep in the brain, directly into the lateral hypothalamus, of freely moving mice. We found that direct, selective, optogenetic photostimulation of Hcrt neurons increased the probability of transition to wakefulness from either slow wave sleep or rapid eye movement sleep. Notably, photostimulation using 5-30 Hz light pulse trains reduced latency to wakefulness, whereas 1 Hz trains did not. This study establishes a causal relationship between frequency-dependent activity of a genetically defined neural cell type and a specific mammalian behaviour central to clinical conditions and neurobehavioural physiology.