Abstract Rapid-eye-movement (REM) sleep is generated in the brainstem, but the brainstem population dynamics that drive transitions to REM sleep remain largely unknown. Here, combining mouse Neuropixels recordings and dimensionality reduction, we found that population activity in the midbrain and pons is dominated by two components, one of which captures strong infraslow fluctuations in neural activity.