Understanding the function of sleep requires studying the dynamics of brain activity across whole-night sleep and their transitions. However, current gold standard polysomnography (PSG) has limited spatial resolution to track brain activity. Additionally, previous fMRI studies were too short to capture full sleep stages and their cycling. To study whole-brain dynamics and transitions across whole-night sleep, we used an unsupervised learning approach, the Hidden Markov model (HMM), on two-night, 16-hour fMRI recordings of 12 non-sleep-deprived participants who reached all PSG-based sleep stages. This method identified 21 recurring brain states and their transition probabilities, beyond PSG-defined sleep stages. The HMM trained on one night accurately predicted the other, demonstrating unprecedented reproducibility. We also found functionally relevant subdivisions within rapid eye movement (REM) and within non-REM 2 stages. This study provides new insights into brain dynamics and transitions during sleep, aiding our understanding of sleep disorders that impact sleep transitions.