Introduction 

Sleep is an integral part of human life and is linked to optimal performance across a broad range of physiological and psychological functions [1,2,3,4]. The relationship between sleep and executive function is an area of intense interest as optimising sleep may be one avenue to improve cognition as we grow older. Executive function, a critical cognitive domain for day-to-day living, has been closely linked to sleep patterns as we grow older. For instance, sleep deprivation is associated with increased frequency of mistakes by shift workers [5] and increased reliance on habits rather than goal-directed decisions that require executive control [6]. Despite a growing body of literature, the exact nature of the relationship between sleep and cognition remains unclear. Importantly, what is the optimal amount of sleep required for cognitive functioning? Does this change as we age? These are not straightforward questions, as studies have highlighted different sleep lengths as detrimental or beneficial for cognitive performance. Additionally, how strong is the causal relationship between sleep and cognition? This is crucial if sleep is to be considered a key modifiable lifestyle factor to optimise cognition and mitigate risk of certain brain disorders, especially dementia.

This article offers an overview of the current literature examining sleep duration and executive function in mid-to-late life and will explore key issues including potential underlying mechanisms, the link with brain structural health, and potential contribution to developing dementia.

The Importance of Executive Function

Executive function is the orchestration of goal-oriented processes that include attention, problem solving, planning, and working memory. This includes the ability to hold information in your short-term memory, manipulate that information, and decide which part of the information is important for the task at hand. Executive functioning is particularly developed in humans compared to other animals, and is important for performing everyday tasks ranging from getting dressed, following a recipe, driving a car to more complex problems [7]. During adulthood, executive function declines with age along with several other cognitive domains [8,9,10]. Furthermore, executive function is commonly affected across a wide range of neurological and psychological disorders such as dementia (particularly fronto-temporal dementia), stroke, and head trauma [11,12,13,14]. It is therefore critical to understand modifiable factors, such as sleep, that could potentially optimise executive function.

How is Executive Function Tested?

Executive function is tested in several ways. Common measures include goal-oriented tasks like the trail-making test [15], digit-symbol substitution test (DSST) [16], Wisconsin card sorting test [17], or the Stroop test [18, 19]. Such tasks require a combination of attention, online processing of information, and cognitive effort. Some tasks will engage cognitive control, whereby participants have to decide when to act (‘GO’) but also when not to act (‘NO-GO’), while others may require a participant to place themselves in the mind of another person (theory of mind). More general questionnaires of cognition, such as the Mini Mental State Examination (MMSE) [20] and Montreal Cognitive Assessment (MoCA) [21], may have subcomponents of executive function. These can be useful as scalable tests of cognitive ability for large-scale studies but do not assess executive function with the detail of dedicated tasks. By contrast, there are specific cognitive tasks of executive function created to answer specific questions [22, 23], but these may be hard to incorporate into larger studies. Box 1 demonstrates 3 tests you can try yourself.

figure a

Function

Sleep deprivation is common, with 11.8% of respondents reporting less than 5 h sleep on average in a large US survey [25]. Deficits in motor performance due to sleep deprivation are equivalent to blood alcohol content of 0.05–0.1%, which is comparable to the legal driving limit of 0.08% [26] in England and the USA. A single night of sleep deprivation has been shown to affect several components of executive function such as sustained attention, reaction time, and working memory, as well as other cognitive domains of consolidation of episodic and procedural memory [27].

Sleep deprivation experiments can involve keeping participants awake for an extended period of time (usually over 24 h), or restricting sleep to only a few hours over multiple days. Cognition is tested before, during, and after sleep deprivation periods. Tasks requiring sustained attention show worse performance over 28 h of sleep deprivation [28]; with more pronounced effects, the more mundane the task is [29]. Creative thought processes are affected more than rule-based processes [30], and people revert to habitual actions rather than goal-directed actions for the task at hand [6].

The real-life impact of sleep deprivation is exemplified in studies of risk aversion, with several prominent studies examining occupations such as the military. Sleep-deprived individuals have impaired risk perception, where they performed worse in a simulated balloon overinflation experiment after 36 h of staying awake. Doing well on this task requires participants to pay attention to the balloon; contextualise it with previous inflation attempts; assess, in real time, the odds of the balloon popping; and inhibit the urge to score higher with a bigger balloon. Interestingly, poor performance in sleep-deprived participants corresponded to altered brain measures of network connectivity, compared to when the same individual was not sleep deprived [31]. This intra-subject analysis suggests that sleep deprivation may alter the way information is communicated through the brain. A meta-analysis, which pooled large amounts of data from multiple studies, involving 1341 sleep restricted military participants identified a significant negative effect on reaction times, processing speed, accuracy, and moral decision making [32].

In addition to executive function, sleep has been shown to be important for memory consolidation. Even short naps (as little as 6 min) can improve memory retention, with longer durations being particularly useful for procedural memory. Behaviourally relevant memories are favoured in sleep-dependent consolidation [33]. Therefore, unsurprisingly, sleep deprivation can negatively affect the consolidation of new memories, especially episodic [33, 34] and procedural memory [35,36,37]. Importantly, sleep recovery (being able to sleep a ‘normal’ amount) over the course of a week can lead to improved performance in previously sleep-deprived individuals, back to the level of controls [36].

Sleep extension (sleeping longer than normal) in the short term can reduce the effect of sleep deprivation on sustained attention tasks [38] and memory [36]. There are also interesting studies investigating factors that affect resilience against sleep deprivation. Older adults showed worse performance, compared to younger adults, following sleep deprivation in multiple cognitive tasks, including those testing vigilance and reaction times [39]. By contrast, older adults did not get a benefit from interval sleep after a motor-sequence learning task, unlike their younger counterparts [40], indicating unequal reliance on sleep for different ages and types of memory consolidation. This effect has not been observed in related non-motor learning paradigms [41].

Therefore, there is robust experimental and real-life evidence that acute periods of sleep deprivation can detrimentally affect cognition. A different question remains—what is the optimal daily duration of sleep to maximise our cognitive functioning? This is relevant to the daily lifestyle habits of all ageing individuals, and may provide insight into those with the worst cognitive functioning, such as in dementia.

Long-Term Effect of Sleep: Both Short and Long Sleep Durations are Associated with Poorer Executive Function

Numerous studies examine the relationship between average sleep duration and executive function. A common way to probe this question has been to ask participants to self-report the average hours of sleep they had recently, and combine it with cognitive tests of executive function administered at a time point within the study. Using this approach, important findings have emerged.

Short and Long Sleep Durations are Related to Worse Executive Function in Cross-sectional Studies

Earlier cross-sectional studies have associated worse executive function with either short or long extremes of sleep duration [42,43,44,45,46,47,48], while more recent studies tend to link both short and long sleep durations with poor executive function [49,50,51,52,53,54,55,56,57,58]. There may be several reasons for these mixed findings.

Firstly, studies tend to use a variety of methods to test cognition. One study of 3212 individuals aged over 60 demonstrated a worse MMSE score for every hour over 7 h of sleep per day in a linear analysis, but no difference in short sleepers [42]. Similar findings were also identified in a study which accounted for sleep-disordered breathing, which is often cited as a missed confounder in long sleep duration and cognitive impairment [50]. A linearly worsening trend at longer sleep durations was also seen in a study of executive function (testing DSST). This trend persisted after adjusting for sex, age, education, and BMI, but unfortunately, hypertension and hypnotic medications were not accounted for [44]. A smaller study of 189 individuals interestingly showed significantly lower MoCA scores with long sleep duration, but not MMSE scores [45]. In contrast with these studies however, worse MMSE scores [59, 60] and immediate and delayed recall [60] have also been associated with shorter sleep. One study showed a linear relationship of worsening global cognition over 2 years with every hour of sleep less than 7 h, when adjusted for sex, age, education, and BMI [61]. Therefore, the broad nature of these cognitive tests may have contributed to different findings.

Secondly, different definitions and thresholds of sleep durations have been applied across studies as ‘long’ sleep duration can range from greater than 7 h to greater than 11 h [42,43,44,45, 47, 48]. Conversely, a ‘short’ sleep duration can range from less than 8 h to less than 4 h depending on the specific study [56, 59,60,61,62,63], which may also contribute to the heterogeneity of results.

Sleep thresholds are now less important, as recent studies have been able to investigate how every hour of sleep reported relates to executive function. This has been made possible by large study cohorts which have consistently identified a quadratic, or inverted ‘U’-shaped, relationship between self-reported sleep duration and executive function with increasingly worse performance with both less and more sleep around a baseline of 7–8 h [49,50,51,52,53,54,55,56,57,58, 64, 65]. A study of around 480,000 individuals, aged 38–73 years, showed that 7 h of sleep per day was associated with the highest executive function performance, using a measure derived from specific computer-based tasks of attention and working memory. Furthermore, there was a parametric decline in executive function associated with every hour of sleep below and above 7 h suggesting an optimal sleep duration (Fig. 1). This finding was consistent for individuals who were below and above the age of 60 years, suggesting that an optimal sleep duration exists as individuals age. This study also showed a similar quadratic relationship between sleep duration and brain volume across 46 different cortical regions which highlights how sleep may be important for brain health [54•].

Fig. 1
figure 1

Association between sleep duration and standardised executive function score from a study of 474,417 individuals in the UK Biobank. Seven hours of self-reported sleep duration was associated with the highest executive function score. A negative relationship was present with sleeping less than 6 h and more sleep from 8 h (Tai et al. 2022, reproduced with permission from the author)

The quadratic relationship between executive function and sleep [54, 64] is observed in other cognitive domains including memory [51, 53, 57, 64], visuospatial abilities [51, 65], verbal fluency [49, 57], and global cognitive tests like the MMSE [50, 55, 56]. This quadratic association is also observed in a large study of around 513,000 participants, aged 15–89 years old, in a non-supervised, online ‘game-based’ test of processing speed, working memory, arithmetic, and visuospatial memory [66]. These findings are additionally confirmed in a more recent meta-analysis that self-reported short and long sleep increased the odds of cognitive impairment by 1.40 and 1.58 respectively [58]. Therefore, cross-sectional studies indicate both long and shorter sleep durations may be detrimental to executive functioning and, importantly, not just the extremes of sleep deprivation and over-sleeping.

Longitudinal Measurements of Sleep Duration Identify Similar Patterns with Executive Function

Cross-sectional studies compare executive function and sleep duration at a single time point. A limitation of this approach is the inability to infer causality. Longitudinal studies, which are more costly to run, offer more information in this regard although cannot strictly determine causality either. Several longitudinal studies have examined sleep duration and executive function. A study where both cognition and self-reported sleep were measured at 3 time points over 10 years showed that long sleep duration was associated with worse global cognition, but not specific cognitive domains. Unfortunately, this study failed to adjust for confounders such as depression, hypnotic use, and sleep apnoea [67]. Another longitudinal study used a combination of EEG measurement and self-reported sleep following 100 participants over 4 years, and showed worsening cognition over time was associated with both short and long sleep durations, similar to cross-sectional studies [68•]. A change in sleep duration out of the optimal range, over a 5-year follow-up, was also related to worse performance in MMSE, fluency, and reasoning tasks, but had no effect on memory [69]. Longitudinal studies therefore indicate that average sleep duration, in a similar pattern to cross-sectional studies, can affect executive function and cognitive ability in the future.

Sub-optimal Sleep Duration May Predict Dementia Onset

An important consideration is whether worsening executive function over time may represent the development of dementia. One study of 2457 elderly participants from the Framingham cohort showed double the risk in those who reported long sleep to be diagnosed with dementia, even when adjusted for a genetic predisposition for Alzheimer’s. Transitioning to long sleep was also associated with a higher risk, than those who previously slept for long durations [70]. Two 2019 meta-analyses support the findings of long sleep being associated with incident dementia [71, 72]. However, a well-controlled longitudinal study of 7959 participants of the Whitehall II study over 25 years indicated that self-reported short sleep duration in mid-life was associated with incident dementia when elderly. They further confirmed this association with objective sleep measures in a subpopulation of 3888 participants. There was no link with long sleep, which they report is due to the fact they are looking at sleep durations from mid-life, whereas other studies focus on the elderly—when any impending dementia may already be affecting sleep patterns [73••]. Therefore, there is evidence that both short and long reported sleep duration may be associated with developing dementia.

Objective Measurements of Sleep Duration and Executive Function

Why are both long and short durations associated with worse executive function? There may be biological reasons, which will be discussed below, as well as practical reasons. Self-reported sleep habits from large cross-sectional studies may not represent true sleep characteristics, as individuals may either over- or under-estimate how long they sleep. Generally, people tend to report ‘time in bed’ rather than actual time asleep [74]. There are also a tendency for those with insomnia to under-report sleep duration and a tendency of those with fragmented sleep (e.g. those with obstructive sleep apnoea (OSA) or depression) to over-report sleep duration [75, 76].

More accurate data comes from electroencephalography (EEG) or actigraphy studies, which objectively measure when an individual is sleeping and delineate sleep stages. While EEG studies are more difficult to carry out and often have smaller sample sizes, actigraphy is increasingly used in large samples to investigate sleep duration [46, 77, 78]. Results from some EEG and actigraphy studies conflict with self-reported sleep data, with total sleep time showing little association with executive function. Blackwell et al. found that total sleep time (TST) measured by actigraphy was related to MMSE score, but not to the trail-making test [46], while Suemoto et al. demonstrated no impairments related to actigraphy-measured TST (10-word list, verbal fluency, and trail-making tests) [79]. Similarly, a meta-analysis of actigraphy and EEG studies showed no associations with TST. Importantly though, early studies were limited by the use of linear analysis models, which may have missed the quadratic relationship recently described between sleep duration and performance. However, a longitudinal study that used both EEG measurement and self-reported sleep had findings consistent with cross-sectional studies with worsening cognition over time in short and long sleep durations [68•]. These objective sleep studies hint at a relationship between sleep and cognition that may go beyond just length of sleep.

In summary, recent literature has emphasised the quadratic relationship between sleep duration and executive function and suggests that there may be an optimal duration of sleep to maximise our cognitive performance. This has both personal and public health implications. However, an interesting and important question that has emerged from objective sleep monitoring studies is whether total sleep duration alone is the best measure of sleep. In the next section, we consider how sleep characteristics other than sleep duration may be relevant to the relationship with executive function.

Sleep Quality May Be More Relevant for Long-Term Cognitive Outcomes than Absolute Duration

Sleep quality may be more important than sleep duration alone when considering the impact on executive function. Evidence from studies with objective sleep recording rather than self-reported sleep duration indicates that time spent in different sleep stages and sleep fragmentation may correlate better to cognitive function than total sleep time alone [78,79,80,81,82,83]. Subjective sleep quality, such as asking whether the participants felt well rested, also correlates better to cognitive function over absolute duration [84].

There are three main reasons for why this effect of sleep ‘quality over quantity’ in relation to cognition may be relevant. Firstly, as discussed previously, there may be several biases with self-reported sleep duration [74,75,76], which may mean the extremes of self-reported sleep durations are acting as a surrogate for poor sleep quality.

Secondly, conditions associated with poor sleep quality are also often related to poor general cognition. This could confound the relationship between sleep and executive function. For example, individuals with OSA can wake numerous times overnight with brief apnoeic spells resulting in poor sleep. This condition is associated with obesity and resistant hypertension [85, 86], which can lead to a decline in cognition via small vessel disease in the brain. Thirdly, sleep architecture evolves with age. Sleep efficiency (SE) (time spent asleep between first falling asleep and waking in the morning) decreases from 89 to 79% from middle age to 70 years old, and the change accelerates over the age of 70 [87]. Given there is concurrent cognitive decline naturally in this time [8,9,10], parsing out the effect of sleep and other factors is difficult but important.

Several studies have explored the link between sleep quality and executive function using various methods. Actigraphy uses a wearable device that measures movements when going to bed to assess parameters like total sleep time (TST), sleep onset latency (SOL), wake after sleep onset (WASO), and general restlessness to gauge quality of sleep. EEG studies tend to use time in slow wave sleep (SWS), rapid eye movement sleep (REM), and non-REM sleep (nREM), as well as the presence and density of sleep spindles [88, 89]. Other studies rely on participants reporting whether or not they had a restful and restorative sleep [83, 84]. Together, these may be used to give an indication of ‘sleep quality’, or of ‘sleep fragmentation’, rather than self-reported sleep duration.

Feeling rested after sleep or not, regardless of actual time reported asleep, was reported to be more indicative of speed and flexibility of processing [67]. Similarly, Teräs et al. reported better executive function in those who reported restorative sleep, in a cross-sectional study of healthy mid-old age participants [83]. Those with more restful nights did better in memory tasks, and those with decreased SOL did better in executive function tasks in a meta-analysis of actigraphy-measured sleep and cognition [81••]. More time in REM was associated with better executive function in adults aged 20–84 (tested with a goal neglect task), and more SWS and sleep spindles were associated with faster response times, an indication of attention and reaction time [80]. Sleep spindle density was also recently reported to be associated with better executive function (using DSST, card sorting, and Stroop) and MoCA scores in a cross-sectional study of sedentary 63 middle-older aged participants [90].

A recent prospective study investigating incident cognitive impairment 4 years after baseline polysomnography found a small, but statistically significant, association of shorter average sleep cycle length and average REM duration [82]. A similar study published in 2023 additionally reported no association on executive function or global cognitive performance with actigraphy-measured TST or SOL. They did however have small associations between lower SE and poorer visuospatial ability. A limitation of the study was only having follow-up data on 70% of the original participants. They also commented on different associations seen between the (self-identified) White and Black participants; with poor sleep having a greater effect on Black participants [91].

In summary, executive function appears to be reliably related to sleep quality as measured by sleep onset latency, wake after sleep onset, and whether participants seem rested or not. EEG studies indicate that time in REM and SWS may be important to the mechanism by which sleep affects cognition. Sleep quality should be considered and investigated specifically in any future studies investigating the link between sleep and executive function.

Biological Mechanisms Underlying the Link Between Sleep and Executive Function

Why is sleep so important to executive function? Studies have explored several biological mechanisms that may underlie the link between sleep and executive function. These include potential changes in brain volume, alterations in brain connectivity, accumulation of neurodegenerative proteins, and disrupted glymphatic drainage (summarised in Fig. 2).

Fig. 2
figure 2

A summary diagram illustrating the relationship between self-reported sleep duration and executive function and the potential mechanisms by which this may occur. SWS slow wave sleep, REM rapid eye movement, OSA obstructive sleep apnoea

Poor sleep may lead to reduced brain volume which affects cognition. A large imaging study has demonstrated a quadratic relationship between sleep duration and executive function and multiple areas of reduced cortical volume [54•]. Cortical thinning was seen with reduced REM sleep [92] and in patients with severe OSA and sleep fragmentation; this was, importantly, shown to be partially reversible after 18 months of CPAP therapy [93].

Changes in brain connectivity may also underpin the effects of sleep deprivation. Diffusion tensor imaging, used to visualise white matter tracts in the brain, has demonstrated changes in structural brain connectivity after just one night of sleep deprivation [27, 94] and with prolonged sleep restriction [95, 96]. A study of young healthy volunteers indicated that goal-directed learning mainly recruited the ventro-medial prefrontal cortex (vmPFC) on fMRI; after sleep deprivation, this activation was less pronounced reflecting worse functional brain connectivity [6].

Beyond changes in brain structure, studies using positron emission tomography (PET) imaging [97] suggest accumulation of neurodegenerative proteins is associated with sleep deprivation [98]. Beta-amyloid is one of two main pathological proteins described in Alzheimer’s disease, the most common form of dementia. Increased amyloid plaques on PET scan, along with reduced cerebrospinal fluid (CSF) amyloid (indicating increased amyloid deposition) over 2 years, were described in 208 cognitively healthy elderly people with OSA [99]. Beta-amyloid plaques are also increased in cognitively intact adults who have shorter and poorer quality reported sleep, as well as those with poor objective sleep quality [100]. While not the remit of this review, there is a growing animal model literature which corroborates findings of accelerated amyloid plaque and tau tangle formation in sleep-deprived states [101].

More recently, the role of glymphatic drainage, representing the waste clearance system of the brain, has been proposed as a mechanism by which amyloid and other toxic metabolites are removed from the brain. One line of evidence suggests that amyloid production in Alzheimer’s may be the same as in healthy people, but that clearance is significantly slowed [100]. The glymphatic system is primarily active during sleep and affected by several factors including sleep architecture (more active during SWS) and the general physiological milieu including hormones like cortisol and noradrenaline [100, 102, 103]. Amyloid uptake shows an inverse relationship with nREM slow wave activity [104]. Amyloid levels in the interstitia are higher in wakefulness in mice, and a small human study found similar results [105], indicating that sleep deprivation may lead to higher amyloid plaque levels via reduced clearance from the brain. This offers a tangible mechanism linking poor sleep to worse cognitive functions and, possibly, increased risk of dementia.

In summary, there are several mechanisms in which poor sleep may contribute to impaired executive function with reduced quality of sleep. The underlying process is likely to be multifactorial involving a complex relationship between these biological processes (Fig. 2). Future studies must consider this complexity to better understand the causal nature between sleep and cognition.

Conclusion and Future Directions

The prospect that sleep may be a modifiable lifestyle factor that can improve our executive function and reduce risk of dementia is both tantalising and real. This is important, especially considering that the worldwide prevalence of dementia is expected to increase by 117% from 2019 to 2050 [106]. There is consistent evidence for an optimal duration of sleep for cognitive function which is relevant to the personal health of every ageing individual. It is important, however, to remember that these findings reflect a group effect and the exact optimal duration may differ between individuals. Furthermore, other sleep factors may be equally important as the duration of sleep.

Future studies should consider both objective sleep duration and quality by incorporating detailed sleep measurements using actigraphy or EEG where possible. The potential benefits justify the costs of such studies at large scale, while the advent of machine learning and artificial intelligence will allow better data processing and interpretation. Development of short, pragmatic cognitive batteries [107] which can be performed remotely and are not culturally specific would improve the feasibility of large-scale, standardised multicentre studies. These technologies would allow longitudinal tracking of cognition and sleep in which, as described, very little research has been conducted to date. The causal direction between sleep and executive function should be further explored through interventional trials which may have an active arm of individuals with targeted sleep advice and support compared to match controls. Furthermore, using alternate approaches such as Mendelian randomisation to leverage genetic information [108] should be performed in larger, diverse populations.

From a scientific perspective, we must better understand the underlying mechanisms linking sleep to cognition and, especially, to the risk of dementia. Moving forward, sleep studies in humans would benefit from the arrival of plasma biomarkers of neurodegeneration such as beta-amyloid, phosphorylated tau, and neurofilament light chain [109]. Such in vivo and minimally invasive measurements of pathological processes have revolutionised the current landscape of dementia research and clinical trials. It is a clear next step for the study of sleep, cognition, and dementia.

In this review, we have tried to identify what is currently understood around sleep and executive function. We have highlighted the expansive literature around sleep duration and executive function and the growing importance of examining sleep quality. We have considered important questions around causality and underlying mechanisms while showing broadly what is currently understood. Finally, we have discussed areas of future research that may expand our understanding around sleep as a modifiable lifestyle factor for cognition, specifically executive function, and the global problem of dementia.