Although sleep is an absolutely essential physiological phenomenon for maintaining normal health in animals, little is known about its function to date. In this section, I introduce the application of optogenetics to freely behaving animals for the purpose of characterizing neural circuits involved in the regulation of sleep/wakefulness. Applying optogenetics to the specific neurons involved in sleep/wakefulness regulation enabled the precise control of the sleep/wakefulness states between wakefulness, non-rapid eye movement (NREM) sleep, and REM sleep states. For example, selective activation of orexin neurons using channelrhodopsin-2 and melanopsin induced a transition from sleep to wakefulness. In contrast, suppression of these neurons using halorhodopsin and archaerhodopsin induced a transition from wakefulness to NREM sleep and increased the time spent in NREM sleep. Selective activation of melanin-concentrating hormone (MCH) neurons induced a transition from NREM sleep to REM sleep and prolonged the time spent in REM sleep, which was accompanied by a decrease in NREM sleep time. Optogenetics was first introduced to orexin neurons in 2007 and has since rapidly spread throughout the field of neuroscience. In the last 13 years or so, neural nuclei and the cell types that control sleep/wakefulness have been identified. The use of optogenetic studies has greatly contributed to the elucidation of the neural circuits involved in the regulation of sleep/wakefulness.