Mind Wandering and Sleep in Daily Life: A Combined Actigraphy and Experience Sampling Study

days and 8 nights. Contrary to our expectations, task-unrelated and stimulus-independent thoughts were not associated with sleep either within-or between-persons ( n = 164). Instead, individual differences in unguided thoughts were associated with sleep disturbances and duration, suggesting that individuals who more often experience unguided train-of-thoughts have greater sleep disturbances and sleep longer. These results highlight the need to consider the context and features of mind wandering when relating it to sleep.


Introduction
Sleep is an essential health behavior that predicts a large variety of health conditions (Cappuccio et al., 2010;Luyster et al., 2012).In addition to promoting health, sleep may support our abilities to perform activities that require concentration (Kusztor et al., 2019).Failures to concentrate can be due to difficulties preventing external distractions or internally oriented, task-unrelated thoughts called mind wandering (Smallwood & Schooler, 2015).A few neurocognitive studies have suggested a physiological link between sleep and mind wandering by observing local sleep-like activity during reports of mind wandering (Andrillon et al., 2021;Andrillon et al., 2019;Jubera-Garcia et al., 2021).These findings suggest that sleep pressure may trigger mind wandering, consistent with the association observed between subjective sleepiness and mind wandering (Stawarczyk & D'Argembeau, 2016).Questionnaire measures on sleep quality and mind wandering correlate with each other (Cárdenas-Egúsquiza & Berntsen, 2022a), but there is little research using ambulatory assessments (Trull & Ebner-Priemer, 2013), especially objective assessments of sleep, to examine how sleep relates to mind wandering in daily life.Before presenting our study, we review the empirical associations between various sleep features and mind wandering in more detail.

Empirical research on mind wandering and sleep
There is a clear negative association between subjectively estimated sleep quality and mind wandering (Cárdenas-Egúsquiza & Berntsen, 2022a), which has been observed whether mind wandering has been measured with retrospective questionnaires (Carciofo et al., 2014;Carciofo et al., 2017;Cárdenas-Egúsquiza & Berntsen, 2022b;Teoh et al., 2021) or with experience-sampling (Carciofo et al., 2017;Marcusson-Clavertz et al., 2020;Ottaviani & Couyoumdjian, 2013;Stawarczyk & D'Argembeau, 2016).Although most studies have been cross-sectional, a daily diary study examined the day-to-day relations between sleep disturbances and mind wandering across eight days (Marcusson-Clavertz et al., 2019).The results indicated that sleep disturbances the previous night predicted greater mind wandering the following day.A limitation of this study was the lack of objective measures of sleep and the fact that mind wandering was measured once per day.Such daily measures of mind wandering require participants to draw inferences about their overall amount of mind wandering that day.These inferences may be affected by availability or representativeness heuristics and are therefore susceptible to various biases, such as weighting recent cases more strongly when judging the relative frequency of a certain event (Kahneman, 2011;Kahneman & Tversky, 1972;Trull & Ebner-Priemer, 2009).Nevertheless, the evidence suggests that subjectively estimated sleep quality predicts lower mind wandering.
The relation between sleep duration and mind wandering is less clear (Cárdenas-Egúsquiza & Berntsen, 2022a).Most studies have been correlational and although they have used sophisticated measures of mind wandering, including factor analytic evaluations of mind wandering across multiple tasks, they have usually measured sleep duration with a single self-report item typically referring to the previous night's sleep.Some studies have observed non-significant correlations between self-reported sleep duration and mind wandering during laboratory tasks (Carciofo et al., 2017;Robison et al., 2020), whereas others have observed significant negative correlations (Unsworth et al., 2021;Walker & Trick, 2018).An experimental study investigated mind wandering during a visual search task after a night of total sleep deprivation or a night of regular sleep (Poh et al., 2016).There was an interaction between sleep deprivation and perceptual load on mind wandering, suggesting that sleep deprivation increased mind wandering in the high-load condition.Although this experiment had strong internal validity, it is unclear how the association between a night of total sleep deprivation and mind wandering during a laboratory task generalizes to daily life fluctuations in sleep and mind wandering.Individual differences in mind wandering are very stable across demanding laboratory tasks (Kane et al., 2021), but the association between mind wandering during laboratory tasks and mind wandering in daily life appear weak or moderate (Kane et al., 2017;Ottaviani & Couyoumdjian, 2013).

The diversity of mind wandering
Mind wandering experiences vary greatly in contents and intentionality.This heterogeneity is important to consider when relating mind wandering to other constructs (Seli et al., 2015;Smallwood & Andrews-Hanna, 2013).Although mind wandering can be construed as a state that varies systematically within-and between-person (Cardeña & Marcusson-Clavertz, 2016), factor analytic research has indicated three distinct, trait-like patterns of mind wandering termed daydreaming styles 1 (Huba et al., 1982;McMillan et al., 2013).The guilty-dysphoric style involves mind wandering characterized by guilt, hostility, and disturbing contents and is often accompanied by frightened reactions.Individuals endorsing this style report poorer sleep quality (Cárdenas-Egúsquiza & Berntsen, 2022b;Starker, 1985;Starker & Hasenfeld, 1976).A second style, poor attentional control, is characterized by difficulty maintaining concentration, feeling distractible, and mind wandering a lot.This style has also been shown to correlate with poor subjective sleep quality (Cárdenas-Egúsquiza & Berntsen, 2022b;Starker, 1985).In contrast, the positive-constructive daydreaming style involves mind wandering thoughts that are deemed helpful, involve problem-solving, vivid imagery, and future-oriented contents, and are often accompanied by pleasant reactions.This style has generally shown very small, non-significant associations with sleep quality (Carciofo et al., 2014;Carciofo et al., 2017;Cárdenas-Egúsquiza & Berntsen, 2022b;Denis & Poerio, 2017;Starker, 1985;Starker & Hasenfeld, 1976).A speculative interpretation of these findings is that sleep supports the control over one's thought contents leading to the reduction of guilty-dysphoric and distracting thoughts, while not affecting the more positive-constructive ones.However, the relation of these styles to objective measures of sleep quality is unknown.
A complicating factor of mind wandering research is that the operationalizations of mind wandering vary considerably across studies making it difficult to synthesize the literature (Murray et al., 2020).A recent call emphasized the need to consider mind wandering as a multidimensional construct involving a family of overlapping features and to be clear about the feature measured (Seli et al., 2018).Common features include task-unrelatedness, stimulus-independence, and the spontaneity of thoughts.Specifically, in the context of cognitive research, mind wandering is often defined as task-unrelated thoughts (i.e., irrelevant to current activity or task).This definition includes both external distractions (e.g., being distracted by a conversation while driving) and internally oriented mind 1 Although the term "daydreaming" is sometimes used to refer to intentional and dreamlike train-of-thoughts unrelated to the surroundings and "mind wandering" is sometimes used to refer to task-unrelated, unintentional thoughts, we use them interchangeably here to broadly refer to any thought or image that is unrelated to current activity or surroundings.
D. Marcusson-Clavertz et al. wandering (e.g., remembering an old friend while driving).About one-third of task-unrelated thoughts are external distractions and the other two-thirds are internally oriented mind wandering (Marcusson-Clavertz et al., 2022).Research on mind wandering and sleep has frequently defined mind wandering as task-unrelated thoughts (e.g., Poh et al., 2016).A second, more restrictive definition of mind wandering refers to it as stimulus-independent and task-unrelated thoughts (SITUTs), which excludes external distractions (Stawarczyk et al., 2011;Unsworth & McMillan, 2014, 2017).Following this definition, one study observed a medium-sized correlation between poor sleep quality and mind wandering during a cognitive task, whereas there was only a very small non-significant correlation between the former and external distractions (Carciofo et al., 2017).However, these content-based definitions have been criticized for neglecting the underlying processes of mind wandering (Christoff et al., 2016).Instead, a third definition of mind wandering refers to it as spontaneous or unguided thoughts, that is, a train-of-thoughts in which the person drift from topic to topic without a directed course (Christoff et al., 2016;Irving, 2016).Guided thoughts, in contrast, would be those that can result in a subjective sense of "being pulled back" whenever the person becomes distracted (Irving, 2016).Unguided thoughts have been less frequently examined in research on sleep and mind wandering, but one study observed an association between poor sleep quality and unguided thoughts during a cognitive task (Marcusson-Clavertz et al., 2020).Other potential features of mind wandering include low meta-awareness (drifting away without noticing it; Schooler et al., 2011), distractibility (difficulty maintaining concentration; Lanier et al., 2021), and shifting (switching between mental sets; Marcusson-Clavertz et al., 2022;Wong et al., 2022).More broadly, examining these features may elucidate how everyday cognitive functioning and sleep are related.
To summarize, subjectively assessed sleep quality is negatively related to mind wandering defined as either task-unrelated thoughts, SITUTs, or unguided thoughts.Sleep quality has also been associated with the poor attentional control and guiltydysphoric daydreaming styles, but appears not to have a clear relation to the positive-constructive daydreaming style (Cárdenas-Egúsquiza & Berntsen, 2022a).The literature is mixed concerning the relation between sleep duration and mind wandering, although a few studies suggest a negative relation between the two, at least when mind wandering is measured during cognitively demanding tasks (Poh et al., 2016;Unsworth et al., 2021;Walker & Trick, 2018).Adding actigraphy measures of sleep and experience sampling measures of multiple mind wandering features would show whether these relations are generalizable to daily life contexts while also clarifying what feature of mind wandering relates to sleep and reducing common method bias.

The present study
This study examined the relation between everyday mind wandering and sleep using ambulatory assessments to increase ecological validity.Participants wore a wristband device that collected both objective (actigraphy) and subjective (experience-sampling) data for 8 nights and 7 days.The study was part of a larger project on everyday mental activity, sleep, and executive functioning.Data was collected at Lund University (Lund, Sweden) and the Central Institute of Mental Health (Mannheim, Germany) between 2017 and 2019.Some of the data collected in Germany (examining the relations of procrastination and rumination to sleep and affect) has already been published (Gort et al., 2021).We have also published data from both sites on how mind wandering relates to executive functioning (Marcusson-Clavertz et al., 2022).We uploaded an analysis plan prior to data collection in 2017 (see supplementary materials).
We expected that poor sleep in daily life (lower total sleep time, higher fragmentation of sleep, and higher sleep disturbances) would predict increased mind wandering (SITUTs) at (a) the day-level (i.e., within-person, between days) and (b) the individual level (i.e., between-persons; H 1 ).Since we uploaded the analysis plan, one study observed that self-reported sleep disturbances predicted unguided thoughts and task-unrelated thoughts (Marcusson-Clavertz et al., 2020).Thus, although our a priori definition of mind wandering was thoughts that were stimulus-independent and task-unrelated (i.e., SITUTs), we also examined how sleep relates to taskunrelated and unguided thoughts.In the analysis plan we had a second sleep-related hypothesis, stating that mind wandering predicts poor sleep the following night (H 2 ), but since then a daily diary study failed to find such relation despite evaluating both sleep and mind wandering with retrospective self-report instruments (Marcusson-Clavertz et al., 2019).Consequently, we were less optimistic that ambulatory assessments of mind wandering would predict actigraphy indices of sleep in this study as it would reduce common method bias.We nevertheless report this analysis as there were several methodological changes to the current study (e.g., measuring distinct features of mind wandering).We also had a third sleep-related hypothesis, expecting that poor sleep would predict perceived difficulties in controlling one's attention, specifically: (a) low awareness of thoughts, (b) distractibility, and (c) difficulty shifting mental sets.However, because these scales of perceived attentional control were created on the fly and did not predict performance on cognitive tasks as expected (Marcusson-Clavertz et al., 2022), they were difficult to interpret and we therefore chose to report their relations to sleep in supplementary materials to narrow the focus to sleep and mind wandering.

Participants
A total of 202 individuals participated in this study (n = 139 from Lund, Sweden, n = 63 from Mannheim, Germany).We advertised it as a study on "attention, sleep, and daydreaming" around each campus.The Lund site also used an online recruitment platform.SDP D. Marcusson-Clavertz et al. and DMC acted as experimenters in the Lund site, and a Master's student acted as experimenter in the Mannheim site.The mean age of participants was 23.95 years old (SD = 5.11; 37 % males and 63 % females) and the majority were undergraduate students (for more details on the sample, see Marcusson-Clavertz et al., 2022) 2 .We planned to have a sample of at least 200 participants with a stopping rule stating that we would not collect data beyond a specific date (1st January 2019).As this study was part of a larger project, we conducted an a priori power analysis to obtain high power to detect associations between mind wandering and cognitive ability (Marcusson-Clavertz et al., 2022), which would also yield approximately 80 % power to detect associations corresponding to an effect size of r = 0.20.This is a feasible effect size based on previously reported correlations between sleep and mind wandering variables (Cárdenas-Egúsquiza & Berntsen, 2022a).

Measures
2.2.1.One-time questionnaires 2.2.1.1.Patient-reported outcomes measurement information system (PROMIS) sleep disturbance scale (short form, version 8b).This is a self-report instrument that includes eight items about sleep disturbances in the last week (Yu et al., 2011).Four items are positively keyed, for example the item "In the past SEVEN (7) DAYS….I had trouble staying asleep" answered on a 5-point scale with options 1 (Never), 2 (Rarely), 3 (Sometimes), 4 (Often), and 5 (Always).The remaining four are negatively keyed, including the item "In the past SEVEN (7) DAYS….My sleep was refreshing" answered on a 5-point scale with options 1 (Not at all), 2 (A little bit), 3 (Somewhat), 4 (Quite a bit), and 5 (Very much).Negatively keyed items were reverse coded so that positive scores reflect greater sleep disturbances, and scores were aggregated by mean computation.Despite few items, this scale correlates strongly with the long form and shows greater measurement precision than other standard questionnaires of sleep quality (Yu et al., 2011).It has shown moderate test-retest reliability over four weeks and correlates negatively with sleep efficiency measured with actigraphy (Chimenti et al., 2021).

The short imaginal processes inventory (SIPI)
. This is a self-report instrument with 45 items (Huba et al., 1982).It includes three scales that are sums of 15 items each.These subscales (and sample items) include the positive-constructive (e.g., "Sometimes an answer to a difficult problem will come to me during a daydream"), guilty-dysphoric (e.g., "I imagine myself failing those I love"), and poor attentional control (e.g., "I have difficulty in maintaining concentration for long periods of time") styles.The Likert response scales range from 1 ("definitely untrue or strongly uncharacteristic of me") to 5 ("very true or strongly characteristic of me").The scales have shown high test-retest reliability over 2-4 weeks (Marcusson-Clavertz & Kjell, 2019;Tanaka & Huba, 1986).They have also shown convergent and discriminant validity with trait-like questionnaires of spontaneous and deliberate mind wandering (Marcusson-Clavertz & Kjell, 2019).This study also showed that whereas poor attentional control style correlated negatively with the tendency to give socially desirable responses, the latter did not correlate significantly with the positive-constructive and guilty-dysphoric styles.

Ambulatory assessments
2.2.2.1.Actigraphy.Participants wore a digital wristband device (Pro-diary, Camntech, Cambridge, UK), which enables estimating total sleep time and sleep fragmentation through actigraphy data.The Pro-diary is worn on the non-dominant wrist and includes a triaxial accelerometer that records data on physical movements3 .It samples data at 50 Hz, and for each second it records the peak acceleration (either positive or negative), which is compared to a threshold of "not moving" (0.1 g).Values below this threshold are ignored, whereas the others are summed over 60 s-epochs to yield scores called "activity counts".Accelerometer-based data collection is a convenient means to estimate sleep in daily life and has been shown to exhibit high accuracy and sensitivity (but moderate specificity) when compared to the gold-standard of sleep measures, polysomnography (Marino et al., 2013).One week of data collection has been shown to provide reliable estimates of individual differences in sleep duration and quality (Falck et al., 2020;van Someren, 2007).

Morning and night questionnaires.
The Pro-diary device also captures experience-sampling data as it includes a small digital display, two buttons, and a slider.We administered two self-initiated morning and night questionnaires.Participants were asked to complete the morning questionnaire each morning at the time they got up from bed.Table 1 shows the items of the morning questionnaire.The first two items were adapted from the consensus sleep diary (Carney et al., 2012).These questions prompted participants to report times on a 24-hour clock in steps of 5 min.The remaining four questions were adapted from the short form of the PROMIS sleep disturbance scale (Yu et al., 2011) and were used to measure daily sleep disturbances.We chose these four questions as they had minimal overlap.We changed the response scale to a continuous visual analogue scale with slightly revised anchor labels because it would allow all options to be simultaneously visible on the small screen.The last two items were reverse coded before computing an average of all four items ranging from 0 to 1 with higher scores reflecting greater sleep disturbances.Participants were instructed to complete the night questionnaire every night when they got into bed.Table 2 shows the questions, which were adapted from the consensus sleep diary (Carney et al., 2012).

Beep questionnaire.
In addition to the self-initiated morning and night questionnaires, a signal-contingent beep questionnaire was administered 10 times per day and included questions on mind wandering, perceived control of attention, and other aspects of current mental activity.The beep questionnaire is described in detail in a previous report (Marcusson-Clavertz et al., 2022).The Swedish version included 14 questions, whereas the German version appended 2 questions on rumination and procrastination that are reported elsewhere (Gort et al., 2021).The questionnaire began with the prompt "right before the beep…" and the first three questions concerned our definitions of mind wandering.The first question asked "Were you thinking about the activity you were doing?" with two response options ("Yes, activity", "No, something else").We did not include mind blanks amongst the response options because a previous ambulatory assessments study estimated that it occurred only about 3 % of the time (Cardeña & Marcusson-Clavertz, 2016).In scenarios where participants would be concentrated on an activity without recalling a specific task-related or task-unrelated thought (e.g., being focused on playing a musical instrument), we instructed participants to indicate that their thoughts were related to the activity.
The second question asked "Were you thinking about something in the immediate surroundings?"with two response options ("Yes, surroundings", "No, something else").Answering "No, something else" on both questions was coded as stimulus-independent and taskunrelated thoughts (SITUTs), our primary definition of mind wandering.In comparison, the second definition of mind wandering refers to it as task-unrelated thoughts (TUT), which includes all thoughts unrelated to current activity.In other words, task-unrelated thoughts include both internally oriented mind wandering and external distractions, whereas SITUTs only include the former.In support of their validity, a principal components analysis indicated that these items load on the same component together with spontaneous and fanciful thoughts as well as future-and past-oriented, but not present-oriented thoughts, suggesting that participants' responses are internally consistent (Cardeña & Marcusson-Clavertz, 2016).Furthermore, reports of task-unrelated and stimulus-independent thoughts correlate with physiological indicators of perceptual decoupling of task stimuli (Schooler et al., 2011).We chose dichotomous response options for these two questions assuming that the most recent thought can be largely categorized into being either on or off task or internally or externally oriented.A recent study investigated whether dichotomizing a continuous measure of task-unrelated thoughts would alter the associations with other constructs and concluded that the continuous scoring approach did not improve the correlations over the dichotomization (Kane et al., 2021).
The third question asked "Were you in control of/guiding your thoughts?"and was answered on a 100-point visual analogue scale ranging from 0 (not at all) to 1 (fully), similarly to all the remaining items.This item was reverse coded and labelled unguided thoughts to make it easier to compare to the other mind wandering measures.Thus, the third definition of mind wandering referred to it as unguided thoughts.This item has been used in a n-back task showing high reliability across blocks and correlating with sleep disturbances (Marcusson-Clavertz et al., 2020).A factor analysis showed that a similarly worded item on undirected thoughts loaded strongly and negatively on a factor that included specific and directed thoughts, which was separable from stimulus-independent thoughts (Klinger & Cox, 1987).We chose a continuous scale for this question to allow individuals to grade the degree they guided the course of their thoughts, as they may sometimes guide their thoughts very strongly to a specific topic (e.g., carefully attending to a lecture), or moderately (e.g., during driving paying attention to the road while allowing the mind to drift at times), or not at all (e.g., sitting on a bus letting the mind drift freely).Note.All 0-1 response scales were 100-point visual analog scales.a Starting value was 20:55 to reduce the amount of scrolling participants had to do.b Starting value was the current time to make it easier for participants to just press Ok if they completed this morning questionnaire as they went out of bed (which they were instructed to do).

Table 2
Night questionnaire (translated from Swedish to English).

Procedure
Participants were recruited for a one-week ambulatory assessments study.The study also included two 1-hour laboratory sessions, one prior to and one after the ambulatory assessments (see Fig. 1).In the first laboratory session, participants obtained information about the study and filled out a written consent form.Next, participants filled out the SIPI, a personality questionnaire, and a demographic questionnaire.They also completed a battery of four cognitive tests.Lastly, participants received the Pro-diary and an instructional manual for the device and the experience sampling questionnaires.The first four pages of the instructional manual were mandatory reading during the first session and covered information about how to use the device, how to fill out each questionnaire, and how to answer the first two questions of beep questionnaire (task-unrelated and stimulus-independent thoughts).Examples were provided to increase the comprehension of each question.The remaining pages included similar explanations and examples for the remaining questions in the Pro-diary.Participants were encouraged to read those at home.
Each participant was asked to wear the Pro-diary for seven days and eight nights while actigraphy data was collected.For the beep questionnaire, participants selected a suitable 12 h 30 min window for weekdays and weekends.Each day was parsed into 10 smaller 70-min windows with one random beep each (we inserted a 5 min buffer between each beep to reduce the risk that multiple beeps occurred too close to each other).For instance, if the person selected the interval of 9 am to 9:30 pm, the first beep would randomly occur between 9:00 am and 10:10 am, the second beep would randomly occur between 10:15 am and 11:25, and so on.Each day, participants were instructed to complete the night questionnaire at the time they went to bed and the morning questionnaire at the time they got out of bed.To increase response rate to the morning questionnaire, the first two beeps of the day included a reminder prompt to fill out the morning questionnaire.Similarly, the last two beeps of the day included a reminder prompt to fill out the night questionnaire.The ambulatory assessments period started with two practice beeps on the same day as the first laboratory session.Data collection then began with the night questionnaire that night, followed by 7 days that included all three questionnaires (beep, morning, night), followed by the final morning questionnaire on the following morning.Thus, sleep data was collected for 8 nights whereas mind wandering data was collected for 7 days.
The second laboratory session was conducted at the earliest convenience after the ambulatory assessments period ended.Participants completed the 8-item version of the PROMIS sleep disturbance questionnaire among other measures not reported here, including a battery of five cognitive tasks, a physical activity questionnaire, and a dissociation questionnaire.All questionnaires referred to their experiences during the ambulatory assessments period.Participants were then debriefed and compensated.The study was approved by the regional ethics review boards at Lund University and the Medical Faculty Mannheim of the University of Heidelberg, and was conducted in accordance with The Code of Ethics of the World Medical Association (Declaration of Helsinki).

Actigraphy data
We analyzed the accelerometer data with MotionWare version 1.2.5 (https://www.camntech.com/motionware-software/).This software was originally designed for the MotionWatch by the same company (Camntech, Cambridge, UK) but is routinely used for the Pro-diary as they use the same type of accelerometer.One difference between the devices is that the Pro-diary does not include a light sensor so the onset of bedtime (labelled "lights out" in MotionWare) and the offset ("got up") were defined in the following way: By default, we used the digitally recorded time stamp of the time they initiated the night questionnaire as the lights out time, because participants were instructed to complete this questionnaire when they went to bed.However, if participants indicated in the response to the first question of the night questionnaire (see Table 2) that they got into bed on a different time, we used their response to this Fig. 1.A depiction of the study procedure.Note.Additionally, participants were asked to complete the night questionnaire on the night prior to day 1 and the morning questionnaire on the morning following day 7, resulting in a total of 8 nights of sleep data and 7 days of mind wandering data.SIPI = Short imagining processes inventory.PROMIS SD = Patient-Reported Outcomes Measurement Information System (PROMIS) sleep disturbance scale.question as the lights out time.Similarly, we used the digitally recorded time stamp of the morning questionnaire as the got up time, unless they indicated in response to question 2 that they got up earlier (see Table 1), in which case we used that response as the got up time.
With lights out and got up times defined for each night, the MotionWare algorithm was applied to estimate sleep (Elbaz et al., 2012).We stored data in 60 s epochs to reduce battery use and minimize the need for participants to charge the device.For 60 s epochs the software uses the following algorithm to estimate "sleep"/"wake", "fall asleep"/"woke up", and "mobile"/"immobile" (all settings were software default).The activity of each epoch is scored by weighting the epoch in question (n) by 1, the preceding (n-1) and subsequent (n + 1) epochs by 0.2, and the next neighboring epochs (n-2, n + 2) by 0.04.If the epoch activity score is above 20 it is coded as wake and if it is equal to or below 20 it is coded as sleep.This high-sensitivity threshold is the recommended default in the software and has been shown to converge with polysomnography measures of sleep (Elbaz et al., 2012).In the calculation of "fall asleep", however, 10 min blocks are considered based on the assumption that shortly after falling asleep there should be little or no movement.This is an iterative process starting from the lights out time that searches for the first 10 min block in which at least 9 of the 10 epochs have activity counts ≤ 6, otherwise the process continues by moving 1 min forward and repeating the search.The "woke up" calculation uses an analogous algorithm although it examines a 5 min block instead.This iterative search process begins at the last 5 min starting from the got up time.If three or more of those epochs had activity counts > 6 it stops the search for the woke up time, otherwise it continues the search by moving 1 min backward and repeating the process.Total sleep time was then estimated by counting the number of sleep epochs within the fall asleep − woke up window.
To measure how fragmented each sleep period was, an additional coding was applied to determine whether participants were mobile or immobile during each epoch.If epoch activity scores were < 4, participants were coded as immobile during those epochs, otherwise they were considered mobile."Mobile time (%)" was then calculated as the percentage of epochs during the sleep period that were coded as mobile.Furthermore, an "immobile bout" was defined as a block of contiguous epochs coded as immobile."Immobile bouts ≤ 1 min (%)" were then computed as the percentage of these immobile blocks that were only 1 min long or less.Fragmentation index was then scored as the sum of mobile time (%) and immobile bouts ≤ 1 min (%).That is, a night of sleep was considered more fragmented if a greater proportion of epochs were coded as mobile and a greater proportion of the immobile blocks were very short (≤1 min).We used fragmentation index as an objective estimate of poor sleep quality.

Inferential analyses
As ambulatory assessments are nested within individuals, we evaluated the hypotheses with multilevel modelling using HLM version 8.0 (Raudenbush et al., 2019).For the analyses with mind wandering as outcome and sleep variables as predictors, we treated mind wandering reports as level-1 observations nested within days (level-2), nested within individuals (level-3).In these models, level-3 variables were grand mean centered (z transformations), whereas level-2 variables were within-person centered.Specifically, total sleep time, fragmentation index, and PROMIS daily sleep disturbances the previous night were used as predictors.We planned to use Bernoulli modelling with the Laplace estimation method because mind wandering (SITUTs and task-unrelated thoughts) was coded as binary (Raudenbush et al., 2019).However, because the Laplace model did not converge for SITUTs, we used the penalized quasilikelihood (PQL) estimator with robust standard errors instead.Intercepts were modelled as random as planned but modelling the slopes as random typically lead to convergence issues and non-significant random effects, possibly because of few days of data per participant.Slopes were therefore modelled as fixed effects.This analysis with SITUTs as the outcome was detailed in the analysis plan, but we also performed analogous analyses with task-unrelated thoughts and unguided thoughts as outcomes, because they have recently been shown to relate to sleep disturbances (Marcusson-Clavertz et al., 2020).Unguided thoughts were modelled as normally distributed and analyzed with the restricted maximum likelihood estimator.
For the second hypothesis, we analyzed the other direction, whether mind wandering predicts sleep.Consistent with the analysis plan, we evaluated this hypothesis by performing a multivariate two-level model with days as level-1 and individuals as level-2 data.Total sleep time, fragmentation index (reverse coded), and sleep disturbance (reverse coded) were analyzed together as a multivariate outcome (labelled "global sleep index" with higher scores reflecting longer sleep / higher sleep quality).Day-level means (withinperson centered) and person-level means of mind wandering (grand-mean centered) were used as predictors together with three covariates (number of caffeinated and alcoholic drinks and nap total sleep time; within-person centered).
In addition to the multilevel analyses, we computed a correlation matrix on individual scores to assess zero-order associations between sleep and mind wandering variables.We also included daydreaming styles, because a recent review highlighted the relations of these variables to sleep (Cárdenas-Egúsquiza & Berntsen, 2022a).We set α to 0.05.To control error rate due to high number of analyses we compared the multilevel models to null models (intercept-only) with likelihood ratio tests, which examines the extent that the model reduces the deviance statistics (Raudenbush et al., 2019).We also estimated false discovery rates with q-values (Benjamini & Yekutieli, 2001) for the correlations between ambulatory assessments of mind wandering (SITUTs, task-unrelated, unguided thoughts) and sleep (total sleep time, fragmentation index, sleep disturbances).Datasets for the analyses on sleep and mind wandering are available online (see supplementary materials).

Missing data
Six of the 202 participants who began the study withdrew during the ambulatory assessments phase of the data collection.Nine participants appeared not to have worn the Pro-diary device during the nights as there were no activity counts registered.Eight D. Marcusson-Clavertz et al. additional participants provided analyzable accelerometer data on only 1 or 2 nights.These individuals were also excluded from the analysis as described in the analytic plan.Twenty-two of these individuals provided data on the first laboratory session, and comparing them to those who successfully provided analyzable accelerometer data on at least three nights revealed that the latter were 2.55 years older, t(1 9 2) = 2.21, d = 0.50, p =.028.However, the two groups did not differ in sex or any of the SIPI daydreaming styles (d < 0.19, p >.423).Twenty of the participants who failed to provide at least three analyzable nights of accelerometer data did complete the daily PROMIS sleep disturbance scale.Comparing this group to those who successfully provided at least three analyzable nights of accelerometer data did not reveal a significant difference in sleep disturbances, although the latter had slightly higher average scores, t (1 9 1) = 1.37, d = 0.32, p =.173.In addition to the 23 individuals who did not provide at least three analyzable nights of accelerometer data, we could not retrieve Pro-diary data from six additional participants due to a technical error.Thus, the sample that we used for reporting the summary data below includes 173 participants (86 %).

Summary of sleep and mind wandering data
Individual-level summary data is shown in Table 3 and Fig. 2 (n = 173).Actigraphy measures indicated that participants slept on average 6 h and 38 min with a mean fragmentation index score of 30.43, which is very similar to previous research using the Pro-diary (Henry et al., 2020).The intraclass coefficients (ICCs) were 0.19 for total sleep time and 0.45 for fragmentation index.This means that 19 % of the variance in total sleep time was systematic between-person variance and 81 % were within-person variance (including systematic day-to-day variance and error variance), whereas 45 % of the variance in fragmentation index was between-person variance and 55 % were within-person variance.As for the experience-sampling measure of sleep (the modified 4-item PROMIS sleep disturbance scale), a mean score of 0.41 indicates that, on average, participants reported moderate sleep disturbances.The ICC was 0.35 for this scale, which means that 35 % of the variance in this scale can be attributed to between-person variability.This scale had a withinperson reliability coefficient of 0.71 and a between-person reliability coefficient of 0.94.This suggests that the scale had good reliability in detecting systematic day-to-day changes and excellent reliability in detecting systematic individual differences in sleep disturbances.As for the one-time questionnaire (the 8-item PROMIS sleep disturbance scale), the mean score of 2.53 indicate moderate sleep disturbances.This score corresponds to a "t-score" of 50.1, that is, close to the mean of the U.S. calibration sample (Yu et al., 2011).For comparison, this mean is lower than the mean of a Dutch sleep-clinic sample but higher than a high-school sample (van Kooten et al., 2021).As for the covariates in our study, participants reported an average nap duration of 11.86 min per day (SD = 17.16), 1.59 caffeinated drinks per day (SD = 1.31), and 0.78 alcoholic drinks per day (SD = 1.10).
As for the beep questionnaire, this sample of 173 participants completed on average 56.85 probes (approximately 81 %).This compliance is close to the average (79 %) of similar ambulatory assessments studies (Wrzus & Neubauer, 2022).Participants reported task-unrelated thoughts on 32 % of the completed probes.SITUTs, which exclude external distractions, were reported on 21 % of the completed probes.The other relevant measures are summarized in Table 3.A previous report of this dataset analyzed compliance to the momentary measurements and provided descriptive summaries of all items in the beep questionnaire (Marcusson-Clavertz et al., 2022).

Correlations between sleep and mind wandering
Before testing our hypotheses using multilevel analyses we report the correlation matrix showing the zero-order associations between sleep and mind wandering variables at the person-level.As shown in Table 4, individual differences in task-unrelated thoughts and SITUTs did not significantly correlate with any sleep variables.However, unguided thoughts correlated with greater sleep disturbances, r(1 7 1) = 0.27, 95 % CI [0.13, 0.40], p <.001, and longer total sleep time, r(1 7 1) = 0.27, 95 % CI [0.13, 0.41], p <.001.This means that people with greater tendency to engage in thoughts without controlling or guiding their course on average reported greater sleep disturbances and slept longer (see Fig. 3).The false discovery rate based on the nine correlations between ambulatory assessments of mind wandering and sleep measures was q = 0.001, which indicates that we should expect about 0.1 % of the significant findings to be false positives.As for the SIPI questionnaire, daydreaming styles generally showed weak positive correlations with poor sleep quality (i.e., fragmentation index measured with actigraphy and sleep disturbances measured with experience sampling and questionnaire).Within-person correlations for sleep measures are reported in supplementary material.

Multilevel analyses on sleep as a predictor of daily life mind wandering (Hypothesis 1)
We next analyzed sleep as a within-person and between-person predictor of mind wandering defined as either SITUTs, taskunrelated thoughts, or unguided thoughts.Nine people of the 173 participants did not have at least 3 days of data with both observed sleep data from the last night and at least 3 answered experience sampling prompts in the following day.As detailed in the analysis plan, they were excluded so that we could assess day-level associations as well.The results are thus based on 164 participants, 1,050 days, and 8,707 experience-sampling reports.
The results with mind wandering defined as SITUTs are reported in Table 5. Contrary to our expectations, sleep variables did not predict daily life SITUTs using the ambulatory assessments of sleep and mind wandering.That is, neither total sleep time, fragmentation index, nor self-reported sleep disturbances predicted SITUTs whether day-level or person-level associations were considered.We also explored mind wandering defined as task-unrelated thoughts using the same sleep variables as predictors, but this model did not outperform the null model, χ 2 (6) = 8.09, p =.232 (the full model is reported in supplementary material).
The results with mind wandering defined as unguided thoughts are reported in Table 6.The within-person associations of sleep

Table 4
Correlations of individual differences in sleep and mind wandering using ambulatory assessments (AA) and retrospective questionnaire data (between-person, n = 173).measures and unguided thoughts were not significant, but there were two significant between-person associations.Person mean scores of sleep disturbances predicted higher unguided thoughts (p <.001).That is, individuals who reported greater sleep disturbances across the sampling period also reported more unguided thoughts (see Fig. 3).Person mean scores of total sleep time also predicted higher unguided thoughts, indicating that those who slept longer experienced more unguided thoughts (p =.012), which is in the opposite direction than what we expected.Fragmentation index did not predict unguided thoughts.In summary, ambulatory assessments of sleep did not show within-person associations with mind wandering, whether it was defined as SITUTs, task-unrelated thoughts, or unguided thoughts.Individual differences in sleep disturbances and total sleep time were significantly associated with unguided thoughts, but not SITUTs or task-unrelated thoughts.Dichotomizing unguided thoughts (by coding scores above 0.50 as 1 and scores below 0.50 as 0) did not affect our conclusions.Individual differences in unguided thoughts were predicted by z-scores in sleep disturbances (odds ratio = 1.38, 95 % CI [1.16, 1.65], p <.001) and total sleep time (odds ratio = 1.21, 95 % CI [1.02, 1.44], p =.026).

Multilevel analysis on daily life mind wandering as a predictor of sleep (Hypothesis 2)
The global sleep index (reflecting longer sleep time, less fragmented sleep, lower sleep disturbance) was not significantly predicted by the model that included day-level and person-level means in SITUTs and within-person centered covariates (the number of caffeinated and alcoholic drinks and nap minutes).This model did not outperform the null model, χ 2 (5) = 6.30, p =. 278.Specifically, increased SITUTs during the day did not significantly predict the global sleep index, B = 0.02, SE = 0.13, t(9 2 6) = 0.12, p =.905.Neither did person mean SITUTs predict the global sleep index, B = − 0.42, SE = 0.30, t(1 5 9) = − 1.41, p =.160.Analyzing each of the three sleep outcomes separately did not reveal any significant associations with SITUTs at the day or person level.As for the day-level covariates, there were significant associations between the number of alcoholic and caffeinated drinks with total sleep time, but not with fragmentation index or sleep disturbance.Specifically, days in which people reported drinking 1 more alcoholic drink than their person mean were associated with 8 min less sleep that night, B = − 7.56, SE = 1.64, t(7 6 6) = − 4.62, p <.001, and days in which they reported drinking 1 more caffeinated drink than their person mean were associated with 4 min less sleep that night, B = − 4.20, SE = 2.05, t(7 6 6) = − 2.05, p =.041.

Discussion
This study evaluated the relations of ambulatory assessments of mind wandering to objective measures of sleep duration and quality as they unfold in daily life.Contrary to our expectations, previous night sleep did not significantly predict mind wandering the following day, whether mind wandering was operationalized as task-unrelated thoughts, SITUTs, or unguided thoughts.Individual differences in sleep were not significantly associated with mind wandering defined as task-unrelated thoughts or SITUTs, but there were two medium-sized associations between sleep disturbances and total sleep time with unguided thoughts.That is, individuals who reported greater sleep disturbances and/or slept longer reported a greater tendency to engage in thoughts without controlling or guiding their course.Furthermore, a trait-like questionnaire measuring guilty-dysphoric and poor attentional control daydreaming styles showed small positive correlations with objective and subjective measures of poor sleep quality.These results indicate that people who endorse mind wandering according to these SIPI scales show more fragmented sleep and report more sleep disturbances.The discrepancy between ambulatory assessments and questionnaire measures calls into question what aspect of the questionnaire reports of mind wandering relates to daily life sleep.
The absence of significant associations between ambulatory assessments of sleep and mind wandering defined as SITUTs or taskunrelated thoughts could be due to several reasons.A possibility is that sleep only predicts task-unrelated thoughts in cases of more extreme sleep deprivation or particularly demanding tasks, such as a night of complete sleep deprivation or a task with high perceptual load (Poh et al., 2016).About half of our undergraduate sample had between 6 and 7 h of average sleep and 90 % had an average sleep below 7 h and 30 min.Variance in sleep duration attributed to individual differences was also relatively small.Clinical populations with more severe variations in sleep duration may show different relations to daily life mind wandering (cf., Brewin, 1998;Geoffroy et al., 2020), but there is almost no research on this topic using ambulatory assessments (for an exception, see Ottaviani et al., 2014).Adding physiological assessments, including polysomnography measures of specific sleep stages, may shed further light on the relation between specific features of mind wandering and sleep.
Mind wandering defined as unguided thoughts, however, did exhibit associations with sleep disturbances and total sleep time.The association between self-reported sleep disturbances and unguided thoughts was in the expected direction and consistent with the findings of an online study that measured unguided thoughts during a memory task (Marcusson-Clavertz et al., 2020).By contrast, the objective index of poor sleep quality (the fragmentation index) did not predict unguided thoughts in our study.Thus, we cannot rule out self-report biases, although the sleep disturbance scale measures sleep disturbances more globally (covering difficulty falling asleep, difficulty staying asleep, overall sleep quality, and feeling refreshed upon awakening), whereas fragmentation index specifically examines relative mobility once the person has fallen asleep.Moreover, the positive association between total sleep time and unguided thoughts was in the opposite direction to our expectation.A speculative interpretation is that insofar as sleep promotes consolidation of memories leading to strengthened semantic associations (Carr & Nielsen, 2015), sleep may facilitate spontaneous shifts in thoughts.The association between unguided thoughts and total sleep time could be examined further by examining unguided thoughts in contexts that increase the likelihood of semantic associations, such as reading texts.We would expect stronger association between total sleep time and unguided thoughts in such context insofar as sleep enhances semantic associations.Because actigraphy data overestimates sleep in individuals with insomnia (Tryon, 2004) and the latter exhibit poorer cognitive abilities (Wardle-Pinkston et al., 2019), the association between total sleep time and unguided thoughts might also reflect shared variance due to overestimated sleep in individuals with insomnia.Adding polysomnography measures of sleep could help address this concern.
The correlations of poor sleep quality with guilty-dysphoric and poor attentional control daydreaming styles extend previous research (Cárdenas-Egúsquiza & Berntsen, 2022b) by adding an objective measure of sleep fragmentation (actigraphy).These results indicate that individuals who on average exhibit poorer sleep quality report greater guilty-dysphoric or poor attentional control style.However, similar patterns were observed with the positive-constructive daydreaming style so the associations may reflect a broader endorsement of mind wandering rather than a specific affective style.Previous research has not found a clear pattern of sleep and the positive-constructive style (Carciofo et al., 2014;Carciofo et al., 2017;Denis & Poerio, 2017;Starker, 1985;Starker & Hasenfeld, 1976).Measuring the contents of mind wandering or daydreaming mentation using ambulatory assessments (Marcusson-Clavertz et al., 2016) could clarify whether the associations between SIPI scales and sleep quality generalize to momentary experiences and whether they reflect systematic between-person or within-person associations.

Limitations
Some limitations need to be acknowledged.One issue was the amount of missing data.About 11 % of the participants did not provide analyzable sleep data, either because they withdrew during experience sampling or because they provided fewer than three days of observed data.Those with missing data were slightly younger than the others, but we could not detect any difference in daydreaming styles between the two groups.Attrition rate might have been affected by the large number of measures as this study was part of a larger project that also assessed cognitive abilities on nine laboratory tasks (Marcusson-Clavertz et al., 2022).The data of another 3 % of the sample could not be analyzed due to a technical error.In addition, although compliance to the experience-sampling probes was relatively high in this study compared to other experience sampling studies (for a review, see Wrzus & Neubauer, 2022), about one-fifth of the probes were not responded to.Thus, as with most ambulatory assessments studies there is a risk of biased responding to signals, which suggests the need to corroborate the findings with other methods that rule out this bias.Future studies may include financial incentives to increase compliance (Wrzus & Neubauer, 2022).
A second limitation is that we relied on participants assessing whether they were engaging in thoughts related to the current activity or not.Although this is standard in research on daily life mind wandering, it rests on the assumption that participants are typically engaging in a primary activity and that they are able to determine whether the current mentation is related to it (Murray et al., 2020).In defense of this measure of task-unrelated thoughts, a principal components analysis indicated that it exhibited the highest loading on a component characterized by stimulus-independent, future-oriented, past-oriented, but not present-oriented thoughts (Cardeña & Marcusson-Clavertz, 2016).Nevertheless, using open-ended questions and letting independent coders categorize participants' thoughts may be an alternative to the questions used in the present study.Furthermore, our measure of unguided thoughts was designed to discriminate between scenarios in which participants guide the course of their thoughts versus those when the thoughts commence spontaneously.However, a further nuance is that in some scenarios people may purposely allow the mind to spontaneously wander from topic to topic (Seli et al., 2018), whereas in other cases the mind may spontaneously wander to certain topics despite the individual's intentions (e.g., ruminating, worrying).To further distinguish between these categories and clarify their unique relations to sleep, future studies could add questions on freely moving thoughts (Mills et al., 2018), perseverative thoughts (e. g., rumination, worry; Ottaviani et al., 2013), mind blanks (Andrillon et al., 2021), and flow experiences (Kaida & Niki, 2014).There is a strong need for more rigorous psychometric evaluations of ambulatory assessments of mind wandering (for an exception, see Kane et al., 2021).Moreover, we chose the daily life design to prioritize ecological over internal validity.Several findings observed in the laboratory with clearly controlled tasks has been corroborated in daily life investigations (Kane et al., 2007;Kane et al., 2017), although there are some notable discrepancies, including the observation that daily life mind wandering correlates with the personality trait openness to experience, whereas laboratory-assessed mind wandering correlates with neuroticism (Kane et al., 2017).
Although a strength of this study is that it assessed several features of mind wandering and sleep using diverse methods, a third limitation is the large number of analyses, which increases the risk of false discoveries.To control the error rate, we compared the multilevel models to null models and estimated the false discovery rate for the correlational analyses relating ambulatory assessments of sleep to mind wandering.The expected false discovery rate was low suggesting that we should expect few significant findings to be false positives.A fourth limitation is that the sampling period comprised only eight nights of sleep data.Although there is evidence for reliable between-person differences in total sleep time and efficiency obtained with about one week of data (Falck et al., 2020;van Someren, 2007), and our daily measure of sleep disturbances showed good reliability, van Someren (2007) recommended two weeks of sleep data to improve reliability.Longer sampling periods would also allow discriminating between "bad nights" from "bad weeks" of sleep.One study restricted sleep to 5 h per weekday for six weeks and observed cumulative effects of restricted sleep on vigilant attention (Smith et al., 2021).There may be similar cumulative effects of restricted sleep on mind wandering.We prioritized an intensive sampling scheduling (10 beeps per day) to measure daily mind wandering reliably, but as the number of days with valid data was scarce future research may consider extending the study period.
These limitations notwithstanding, this study had several methodological strengths.By sampling mind wandering ten times per day across seven days, it provided ecologically valid estimates of people's daily life tendencies to mind wander in a way that minimizes the risk of retrospective biases (Ebner-Priemer & Trull, 2009).By including actigraphy data this study also minimized the risk that selfreport biases could inflate the associations between mind wandering and sleep.This study increases our knowledge on the generalizability of several previously reported findings from laboratory and survey studies.Specifically, it replicated the association between questionnaire reports of daydreaming styles and sleep quality (Cárdenas-Egúsquiza & Berntsen, 2022b) and extended this association to an actigraphy measure of fragmented sleep.It also replicated the association between sleep disturbances and unguided thoughts observed in an online study (Marcusson-Clavertz et al., 2020), although unguided thoughts were not associated with fragmented sleep.It did not replicate the negative association between sleep duration and mind wandering as observed in a laboratory study (Unsworth et al., 2021).This suggests to us that there are some context-specific effects of the relation between sleep and mind wandering.Sleep deprivation may increase mind wandering during relatively difficult tasks (Poh et al., 2016), which may elicit more unguided thoughts (Seli et al., 2016).We speculate that some of the features of a typical laboratory task (e.g., requiring constant perceptual coupling to monotonous stimuli, being experimenter-exposed, having minimal distractions) influences the relation between mind wandering and other psychological constructs (see also Kane et al., 2021).

Conclusions
Ambulatory assessments methodology is an important tool for examining how sleep and mind wandering unfold over time in ecological settings.By examining several features of sleep and mind wandering, our results suggest that one feature of mind wandering, the extent to which thoughts are unguided (i.e., meandering without control or a guided course) relates positively to sleep disturbances and total sleep time.Ambulatory assessments of task-unrelated and stimulus-independent thoughts did not relate to sleep in this study.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to

Fig. 3 .
Fig. 3. Scatterplots with person mean scores of unguided (spontaneous) thoughts, sleep disturbances, and total sleep time (hours per night, n = 173).Note.All variables are aggregated scores from ambulatory assessments.PROMIS sleep disturbance scale is a modified 4-item version, whereas total sleep time is based on actigraphy data.

Table 1
Morning questionnaire (translated from Swedish to English).

Table 3
Summary of sleep and mind wandering measures (n = 173).
Note.All individual scores from actigraphy and experience sampling measures reflect person mean scores throughout the ambulatory assessments period.SITUTs = stimulus-independent and task-unrelated thoughts.D.Marcusson-Clavertz et al.

Table 5
Mind wandering (stimulus-independent and task-unrelated thoughts) as a function of sleep the previous night (day-level, within-person centered) and on average (person-level, z score; n = 164).Note.a A modified version of the short form of PROMIS sleep disturbances scale including four items.Degrees of freedom were 160 for person-level and 883 for day-level predictors.The intercept was modelled as a random effect.All slopes were modelled as fixed effects because the random slopes model failed to converge and did not indicate any significant variance components related to the slopes.Total sleep time is expressed in hours.

Table 6
Unguided thoughts as a function of sleep the previous night (day-level, within-person centered) and on average (person-level, person mean z score; n = 164).Note. a A modified version of the short form of PROMIS sleep disturbances scale including four items.Degrees of freedom were 160 for person-level and 883 for day-level predictors.Total sleep time is expressed in hours.