Resting state functional magnetic resonance imaging (rs-fMRI) is increasingly applied for the development of functional biomarkers in brain disorders. Recent studies have revealed spontaneous vigilance drifts during the resting state, involving changes in brain activity and connectivity that challenge the validity of uncontrolled rs-fMRI findings. In a combined rs-fMRI/eye tracking study, the pupil size of 32 healthy subjects after 2 h of sleep restriction was recorded as an indirect index for activity of the locus coeruleus, the brainstem's noradrenergic arousal center. The spontaneous occurrence of pupil dilations, but not pupil size per se, was associated with increased activity of the salience network, thalamus and frontoparietal regions. In turn, spontaneous constrictions of the pupil were associated with increased activity in visual and sensorimotor regions. These results were largely replicated in a sample of 36 healthy subjects who did not undergo sleep restriction, although in this sample the correlation between thalamus and pupil dilation fell below whole-brain significance. Our data show that spontaneous pupil fluctuations during rest are indeed associated with brain circuitry involved in tonic alertness and vigilance. Pupillometry is an effective method to control for changes in tonic alertness during rs-fMRI.