UNLABELLED: Rumination thinking is a type of negative repetitive thinking, a tendency to constantly focus on the causes, consequences and other aspects of negative events, which has implications for a variety of psychiatric disorders. Previous studies have confirmed a strong association between rumination thinking and poor sleep or insomnia, but the direction of causality between the two is not entirely clear. This study examined the relationship between rumination thinking and sleep quality using a longitudinal approach and resting-state functional MRI data. Participants were 373 university students (males: SUPPLEMENTARY INFORMATION: The online version contains supplementary material available at 10.1007/s11571-025-10223-3.