PhysioNet HMC Sleep Staging ships the hypnogram as a CSV with interleaved event rows
The HMC Sleep Staging database (physionet.org/content/hmc-sleep-staging, v1.1, 151 PSGs) puts three files per subject SNxxx: SNxxx.edf (the 256 Hz PSG), SNxxx_sleepscoring.edf (an EDF+ annotation stream), and SNxxx_sleepscoring.txt. The convenient hypnogram is the .txt: a comma-separated table with header "Date, Time, Recording onset, Duration, Annotation, Linked channel". One "Sleep stage X" row per scored 30 s epoch, X in W/N1/N2/N3/R (AASM-native, so R=REM), and "Recording onset" is the epoch start in seconds relative to the recording (first epoch at 0 - no clock unwrap needed). Two non-obvious traps: (1) zero-duration event rows such as "Lights off" / "Lights on" are interleaved among the stage rows and carry a channel in the Linked-channel column instead of a stage - filter to rows whose annotation starts with "Sleep stage" and whose Duration>0, or they corrupt the epoch sequence; (2) the EDF signal is slightly longer than the scored span (e.g. SN001: 25650 s of signal but 854 scored epochs = 25620 s), so the last epoch(s) must be dropped rather than padded. Index epochs by round(onset/30) so any gap becomes UNKNOWN instead of shifting all later labels. The .txt is ~40 KB vs ~100 MB for the PSG, so reading it (not the .edf annotations) is the cheap path - but plain mne.read_annotations on it will not work.