Rapid eye movement (REM) and non-REM (NREM) sleep are controlled by specific neuronal circuits. Here we show that galanin-expressing GABAergic neurons in the dorsomedial hypothalamus (DMH) comprise separate subpopulations with opposing effects on REM versus NREM sleep. Microendoscopic calcium imaging revealed diverse sleep-wake activity of DMH GABAergic neurons, but the galanin-expressing subset falls into two distinct groups, either selectively activated (REM-on) or suppressed (REM-off) during REM sleep. Retrogradely labeled, preoptic area (POA)-projecting galaninergic neurons are REM-off, whereas the raphe pallidus (RPA)-projecting neurons are primarily REM-on. Bidirectional optogenetic manipulations showed that the POA-projecting neurons promote NREM sleep and suppress REM sleep, while the RPA-projecting neurons have the opposite effects. Thus, REM/NREM switch is regulated antagonistically by DMH galaninergic neurons with intermingled cell bodies but distinct axon projections.