Rapid eye movement sleep (REMs) is characterized by activated electroencephalogram (EEG) and muscle atonia, accompanied by vivid dreams. REMs is homeostatically regulated, ensuring that any loss of REMs is compensated by a subsequent increase in its amount. However, the neural mechanisms underlying the homeostatic control of REMs are largely unknown. Here, we show that GABAergic neurons in the preoptic area of the hypothalamus projecting to the tuberomammillary nucleus (POAGAD2→TMN neurons) are crucial for the homeostatic regulation of REMs in mice. POAGAD2→TMN neurons are most active during REMs, and inhibiting them specifically decreases REMs. REMs restriction leads to an increased number and amplitude of calcium transients in POAGAD2→TMN neurons, reflecting the accumulation of REMs pressure. Inhibiting POAGAD2→TMN neurons during REMs restriction blocked the subsequent rebound of REMs. Our findings reveal a hypothalamic circuit whose activity mirrors the buildup of homeostatic REMs pressure during restriction and that is required for the ensuing rebound in REMs.