An increase in pupil size is an important index of listening effort, for example, when listening to speech masked by noise. Specifically, the pupil dilates as the signal-to-noise ratio decreases. A growing body of work aims to assess listening effort under naturalistic conditions using continuous speech, such as spoken stories. However, a recent study found that pupil size was sensitive to speech masking only when listening to sentences but not under naturalistic conditions when listening to stories. The pupil typically constricts with increasing time on task during an experimental block or session, and it may be necessary to account for this temporal trend in experimental design and data analysis in paradigms using longer, continuous stimuli. In the current work, we re-analyze the previously published pupil data, taking into account a problematic constraint of randomization and time-on-task, and use the data to outline methodological solutions for accounting for temporal trends in physiological data using linear mixed models. The results show that, in contrast to the previous work, pupil size is indeed sensitive to speech masking even during continuous story listening. Furthermore, accounting for the temporal trend allowed modeling the dynamic changes in the speech masking effect on pupil size over time as the continuous story unfolded. After demonstrating the importance of accounting for temporal trends in the analysis of empirical data, we provide simulations, methodological considerations, and user recommendations for the analysis of temporal trends in experimental data using linear mixed models.