Introduction

Types of sleep problems tend to vary in different age groups. For example, the prevalence of delayed sleep–wake phase disorder is high in adolescents and young adults, owing to the predominance of the evening chronotype during this period [1, 2]. Additionally, people with the evening chronotype tend to go to bed late; however, on weekdays, social factors, such as classes or work, strongly dictate their wake-up time, making them prone to a sleep deficit [3].

The chronotype undergoes progressive changes with age [4]; insomnia with early morning awakening [5] and advanced sleep–wake phase disorders are common in older people [2]. Sleep duration also decreases with age, but sleep loss and daytime sleepiness are frequent in young adults [6]. Contrastingly, the proportion of slow-wave sleep decreases and wakefulness after sleep onset increases with age [7]. Additionally, sleep disorders such as obstructive sleep apnea [8], restless legs syndrome (RLS) [9], and periodic limb movement disorders [10] increase in prevalence with age.

Sleep problems, such as sleep loss, extreme evening chronotype, and low sleep quality, including the possibility of sleep disorders, impair daytime cognitive function. Several studies show that sleep loss and sleep deprivation impair attention, vigilance, and decision-making [11,12,13,14], as well as emotional regulation [15, 16] and social cognitive functioning-related face recognition and empathy [17]. Low sleep quality, indicated by Pittsburgh Sleep Quality Index (PSQI) scores, is also associated with attention deficits [18] and sleep disorders, including obstructive sleep apnea syndrome [19, 20], RLS [21], and insomnia [22], which are associated with declines in cognitive function.

A delayed sleep phase due to the evening chronotype in young adults can also have deleterious effects on cognitive function via misalignment of desired sleep–wake patterns and the internal chronotype. Young adults with a delayed sleep phase tend to exhibit worse academic performance [23] [24] and subjective estimation of executive function [25]. However, some studies have demonstrated a relationship between the evening chronotype and objective higher cognitive function in middle-aged and older people [26].

As mentioned above, sleep loss, sleep quality, and chronotype affect cognitive function. However, it is uncertain how each sleep parameter affects cognitive function across different age groups. Therefore, this study examined whether the effects of sleep variables (low sleep quality, sleep loss, and chronotype) on cognitive function among daytime workers varied in different age groups.

Materials and methods

Data collection and participants

All data were collected online. Participants were recruited through Cross Marketing Inc. We requested employed people in their 20s, 40s, or 60s (excluding part-time workers), who were registered as survey panelists with Cross Marketing Inc. The inclusion criteria were daytime employment and the ability to provide responses via a personal computer (PC). The exclusion criteria were shift-work, major health problems, current treatment at a hospital, and color blindness. Participants responded to the question items on the Cross-Marketing Inc. website. The respondents were automatically transferred to the page for task implementation on the Pavlovia (http://pavlovia.org) server, where they performed the Stroop task on their individual PC browsers. Cross Marketing Inc. compensated participants with web service points equivalent to 120 JPY to each participant. This protocol was approved by the research ethics committee of Edogawa University (#R03-017A) and was preregistered with the Open Science Framework (https://osf.io/npvdx) before data collection.

Multigroup structural equation modeling was conducted to examine the goodness of fit of the multiple regression model for determining the correlation between sleep variables and cognitive task scores in each age group. Kyriazos [27] reviewed the traditional rules of thumb on sample size determination and suggested a sample of 100 data points for each group as a general rule of thumb for a multigroup structural equation modeling sample design. Therefore, the target sample size was 300 participants, including 50 men and 50 women in their 20s, 40s, and 60s, respectively. The survey was stopped when a sufficient number of participants (n ≥ 65) meeting the above criteria from each age group and gender were recruited.

Questionnaires

The Japanese version of the PSQI [28] Global Score (PSQIG) was used as the sleep quality index. The mid-sleep time on free days corrected for sleep debt accumulated on work days (MSFsc) was used for chronotype indexing, calculated based on the Japanese version of the Munich ChronoType Questionnaire [3], short version (µMCTQ) [29], while weekly sleep loss (SLOSSweek) on the µMCTQ was used to evaluate the sleep loss. Raw scores from the Japanese version of the Karolinska Sleepiness Scale (KSS-J) [30] were used to assess drowsiness. Participants also provided details about their sleep status before the experiment.

Stroop task

The online Stroop test was adopted as a cognitive task; participants were asked to judge the font color of a presented color name and to press a corresponding key under quiet conditions to promote optimal concentration for this task. The task was programmed using PsychoPy Builder [31] and uploaded to the Pavlovia server. We used the Kanji for “ki (yellow),” and “murasaki (purple)” as the color words and yellow and purple as the respective font colors. The appearance ratio of each Kanji was equal, such that each word in each color appeared in the same ratio. The stimulus presentation order was randomized. The condition in which the font color matches the color name is known as the “compatible condition,” and mismatch between the font color and color name is denoted as the “incompatible condition.”

The task consisted of 20 practice trials and 80 main trials. In each trial, a fixation cross was presented for 500 ms, followed by Kanji presentation (target stimulus) until the participant’s response. Participants used the “F” and the “J” keys to register responses. The next trial started following a 500-ms blank (i.e., response–stimulus interval = 500 ms). Feedback was presented only for practice trials to notify participants of errors (incorrect) or delayed (> 1 s) responses.

Data analysis

Cross-Marketing Inc. excluded incorrect responses based on their original criteria, including very short response times for the questionnaires. Additionally, some invalid responses were corrected for according to the criteria described below. If the reported usual bedtime (PSQI) and the weekday bedtime (µMCTQ) were after 6 AM and before 6 PM, they were considered invalid (erroneous choice of AM/PM) and were corrected. Similarly, waking times (PSQI) and weekday waking times (µMCTQ) were corrected for AM/PM errors if they were between noon and midnight. PSQI data were eliminated if, after the modifications described above, the sleep efficiency was > 3 or < 0. µMCTQ data were eliminated if their calculated workday and/or free day total sleep time was < 3 h or ≥ 16 h. Stroop data of participants whose correct response rate was < 60% in the 80 main trials were removed, as this indicated misunderstanding of the task instructions.

Stroop task data were analyzed as follows: (1) trials with reaction times > 2 s or < 250 ms were excluded; (2) the mean and standard deviation of the reaction times of all the remaining trials were calculated; (3) trials with reaction times greater than 3 standard deviations above the mean were excluded; (4) only correct responses were used to calculate mean reaction times; and (5) the differences in reaction times between the two conditions (incompatible–compatible) were calculated as the Stroop interference.

Multigroup structural equation modeling (SEM) was conducted to examine the goodness of fit of a multiple regression model of relationships between sleep variables and cognitive function in different age groups. First, covariance structure analysis for each age group was conducted using SLOSSweek, MSFsc, and the PSQIG as exogenous variables and KSS scores and Stroop interference of reaction time as the endogenous variables. We hypothesized that SLOSSweek, MSFsc, and the PSQIG would affect Stroop interference directly or indirectly through the mediation of the KSS. We set the configural invariance of the model to be confirmed when GFI and CFI were > 0.90 and RMSEA was < 0.10. When confirming configural invariance, we calculated the path coefficients between age groups and conducted test statistics on the differences between variances. If configural invariance was not confirmed, the models for each age group were modified by referring to modification indices to explore a better fitting model. We used IBM SPSS Amos 28 for SEM. For all analyses, an alpha level < 0.05 was judged as significant and that between 0.05 and 0.10 was judged as marginally significant.

Results

Summary of participants included in the analysis

We obtained data from 366 participants. Table 1 summarizes the demographic characteristics of the participants included in the analysis.

Table 1 Summary of participants

Stroop interference in each age group

To confirm the effect of Stroop interference, we conducted a 3 (age groups: 20s, 40s, 60s) × 2 (compatibility: compatible, incompatible) mixed factorial analysis of variance (ANOVA) using the performance in Stroop task as the dependent variable. The main effects of compatibility [F (1, 321) = 31.003, p < 0.001, p. eta2 = 0.088] and age group [F (2, 321) = 20.487, p < 0.001, p. eta2 = 0.113] on reaction time were significant, showing that the reaction for compatible stimuli was faster than that for incompatible stimuli and that of participants in their 20s and 40s was faster than that of those in their 60s (Table 2). The interaction between compatibility and age group was also significant [F (2, 321) = 8.878, p < 0.001, p. eta2 = 0.052], and simple-effects analysis confirmed a significant reaction delay for incompatible stimuli (i.e., Stroop interference) only in the 40s (p < 0.05) and 60s (p < 0.001) age groups.

Table 2 Results of Stroop task performance

The main effects of compatibility [F (1, 321) = 59.814, p < 0.001, p. eta2 = 0.157] and age groups [F (2, 321) = 7.610, p < 0.001, p. eta2 = 0.045] were also significant for the number of correct responses, indicating greater number of correct responses for compatible stimuli compared to incompatible ones and in 60s compared to in 20s and 40s. The interaction for the number of correct responses was not significant [F (2, 321) = 2.230, p = 0.109, p. eta2 = 0.014].

Sleep parameters in each age group

The sleep parameters of the participants are listed in Table 3. One-way ANOVA with the age groups set as independent variables showed a significant main effect for MSFsc [F (2, 327) = 9.072, p < 0.001, p.eta2 = 0.053], SLOSSweek [F (2, 327) = 8.512, p < 0.001, p.eta2 = 0.050], and KSS [F (2, 363) = 3.065, p = 0.048, p.eta2 = 0.017], but not for PSQIG [F (2, 359) = 2.050, p = 0.130, p.eta2 = 0.011]. The results of the following multiple comparisons showed that the 20s group had a greater proportion of evening chronotypes compared to the 40s and 60s groups (both p < 0.01), while the 20s and 40s groups experienced more sleep loss than the 60s group (both p < 0.01). Further, the state sleepiness in the 20s group was higher than that in the 60s group (p = 0.041).

Table 3 Summary of sleep habits and quality of the participants

Effects of sleep parameters on cognitive function

Correlation coefficients between each variable were calculated for each age group (Table 4). After Multigroup SEM, configural invariance was not confirmed because CFI was lower than 0.90 (χ2 = 34.225, p < 0.01, GFI = 0.962, CFI = 0.897, RMSEA = 0.098, AIC = 106.225; Fig. 1).

Table 4 Correlation coefficients between the variables
Fig. 1
figure 1

Results of multigroup structural equation modeling

Therefore, the models were modified by referring to modification indices to explore a better fitting model for each age group. In the 20s age group, covariance between PSQIG and SLOSSweek, and between PSQIG and MSFsc were added to the hypothesis model (Fig. 2). This modification improved the goodness of fit of this model (hypothesis model: χ2 = 16.331, GFI = 0.948, CFI = 0.827, RMSEA = 0.212, AIC = 40.331; modified model: χ2 = 2.038, GFI = 0.992, CFI = 0.987, RMSEA = 0.102, AIC = 30.038) and the marginal significant path coefficient was found between SLOSSweek and Stroop interference (− 0.201, p = 0.052). In the 40s age group, the hypothesis model was judged as the best fit model (Fig. 3; χ2 = 1.825, GFI = 0.992, CFI = 1.000, RMSEA < 0.001, AIC = 25.825) but no significant path to Stroop interference was found. In the 60s groups, the covariance between PSQIG and SLOSSweek, and between PSQIG and MSFsc were added to the model (Fig. 4; hypothesis model: χ2 = 16.072, GFI = 0.948, CFI = 0.850, RMSEA = 0.213, AIC = 40.072; modified model: χ2 = 2.006, GFI = 0.992, CFI = 0.988, RMSEA = 0.102, AIC = 30.006). In this modified model of the 60s group, a significant path coefficient was found between PSQIG and Stroop interference (− 0.309, p = 0.042).

Fig. 2
figure 2

Results of the modified model for the 20s age group

Fig. 3
figure 3

Results of the modified model for the 40s age group

Fig. 4
figure 4

Results of the modified model for the 60s age group

Discussion

In this study, we surveyed the daily cognitive function of employed participants using an online Stroop task, and identified sleep problems by focusing on sleep loss, chronotype, and sleep quality. Based on these results, the developmental changes in the effects of sleep parameters on cognitive function were assessed using multigroup structural equation modeling.

In general, young adults are known to have the evening chronotype [3, 4], and exhibit greater sleep loss and excessive sleepiness during the day compared to elderly people [6]. In this study, the evening chronotype was higher in the 20s age group, and participants in their 20s and 40s showed greater sleep loss compared to those in their 60s and 20s in this study struggled with excessive sleepiness. While many studies have suggested that the quality of sleep is low in the elderly [5, 7], there were no significant differences in the PSQIG (reflecting sleep quality) in this study. It is possible that participants in their 60s had fewer sleep problems; however, the PSQIG was relatively higher than that reported by healthy elderly individuals in previous studies [32]. Similarly, the PSQIG of participants in their 20s and 40s was also higher, suggesting a sampling bias due to the online survey, e.g., several people with a high interest in sleep may have volunteered to participate in the study.

We used the online Stroop task to assess cognitive function. The Stroop interference reflected in the decline in performance of the incompatible stimuli compared to the compatible one may be attributed to the deficit in selective attention. The participants showed more response errors and slower responses to incompatible stimuli, suggesting that the online Stroop task used in this study has a certain level of validity. Additionally, the Stroop interference in reaction time was higher in the 60s group, which is suggestive of the decline in selective attentional function with aging.

The results of multigroup structural equation modeling did not support configural invariance; therefore, we modified the model to explore the best fit model for each group. The results showed that the interindividual difference in sleep loss, chronotype, and sleep quality did not significantly affect the cognitive function measured using the online Stroop task in the 40s age group.

However, in the 20s group, the participants with sleep loss tended to show smaller Stroop interference, indicating greater selective attention. In general, sleep loss is thought to result in a decline in various cognitive performances including attention [11]. As the results of a previous cross-sectional study suggest that elderly people with long sleep duration show a decline in cognitive performance [33], our results may suggest that similar relationships between sleep duration and cognitive performance are present in young adults as well as in older people. However, the mechanism of this relationship is unclear. It is possible that the results may reflect the social structural problem in which business people with higher cognitive function tend to work long hours on weekdays and are sleep deprived. This relationship between sleep loss and higher cognitive function should be carefully interpreted and explored with experimental research methods.

Furthermore, the 60s group demonstrated a significant relationship between the PSQIG and Stroop interference in the reaction time, suggesting that individuals with lower sleep quality showed higher selective attention. This result is not congruent with that of many studies that demonstrated a relationship between low sleep quality, including the presence of sleep disorders, and lower cognitive function [18,19,20,21,22]. The reason for this discrepancy is unclear, but considering that sleep quality was measured subjectively using questionnaires in this study, the subjective perception and/or higher active attention to their own sleep state may be related to selective attention performance in at least the participants in the 60s who had regular daytime employment and did not have major health problems. However, the correlation between the KSS and PSQIG was relatively high, suggesting possible multicollinearity; thus, further research is needed to explore this aspect.

In this study, we explored the effects of subjectively assessed sleep loss, sleep quality, and chronotype on objectively measured cognitive performance focused on selective attention in routine life. As limitations, it is possible that sampling bias arising from the online survey used for data collection influenced the results. To maintain as homogeneous a sample as possible regarding participants’ life-styles, this study targeted only daytime workers. This limitation of the target sample may introduce the issue of the generalizability of the results. In the general population, some people in their 60s are already retired from full-time work. However, the individuals in their 60s in this study were employed full-time and had their own PC. It is possible that these individuals had relatively higher cognitive function, which is reflected in their larger number of correct responses in the Stroop task compared to young participants. Therefore, the generalizability of the results of this study may be limited especially in terms of individuals in their 60s.

We adopted the Stroop task in this study. The reaction time measured with each participant’s PC was affected by the difference in device performance, e.g., polling rate of the keyboard or graphic performance of the PC. However, the cognitive task program conducted with Pavlovia service is thought to be sufficiently reliable for measuring within condition (intra-individual) differences [34]. Therefore, Stroop interference, which was calculated based on the intra-individual difference between the compatible and incompatible stimuli, was used in this study as the main dependent variable and can nullify the delay in the response time caused by such differences between PCs. Moreover, participants were instructed to perform the cognitive task under quiet conditions to promote optimal concentration during the task. However, despite these efforts, the experimental environment of the web-based Stroop test used in this study may have lacked sufficient control compared to lab-based experiments. Additionally, the possibility of issues with motivation to participate in this task may tend to be higher in a web-based anonymous experiment. This problem might have resulted in the relatively high rate of data eliminated from analysis.

Given the above-mentioned reasons, we focused on selective attention as reflected by Stroop interference, however, selective attention is not necessarily sensitive to sleep manipulation [35, 36]. Therefore, future studies should focus on the developmental changes caused by sleep problems on other cognitive functions, e.g., sustained attention or social cognitive function, in lab-based experimental settings.