1 Introduction

Sleep is an essential physiological activity accounting for approximately 30% of the day [1]. Acquiring high-quality sleep with appropriate duration renders individuals able to adapt to changes in the external environment while helping to maintain internal homeostasis [2].

Studies have indicated that sleep is closely related to neurodevelopment [3]. Indeed, Mason et al. [4] believe that there’s a reciprocal relationship between sleep and brain development—brain development affects sleep while sleep reflect brain maturity. This bidirectional relationship suggests that age should be considered when studying the association between sleep and cognition. Moreover, a systematic review suggests that obtaining quality sleep aids maintenance of normal emotional and mental health [5]. Therefore, in addition to eliminating fatigue, sleep also helps maintain normal emotional and cognitive function.

To make the diagnosis (and to provide appropriate treatment) of sleep disorders more unified and accurate, the third edition of the International Classification of Sleep Disorders proposed by the American Academy of Sleep Medicine and international sleep societies divides sleep disorders into several categories. These include insomnia, sleep-related breathing disorders, and parasomnias [6]. Taking insomnia for example, some studies have concluded that at least 10% of people suffer from insomnia and that at least 20% of people experience occasionally insomnia symptoms [7]. The situation in the elderly is worse. A survey found that at least 50% of the elderly living in nursing homes had experienced insomnia-related symptoms [8]. Available data brings the impact of sleep disturbance (SD) into sharp focus.

The rapid global increase in the numbers of older people has imposed huge burdens on society. Cognitive impairment and dementia are common threats for the elderly population [9]. Unfortunately, there is still a lack of effective therapies for prevention/treatment of dementia [10]. It is therefore imperative to identify the risk factors for dementia and to take preventive measures.

Many studies have found a possible connection between sleep and cognitive function [9, 11, 12]. However, most of these studies [11, 12] have issues such as small sample size, which limits interpretation. This article will focus on the elderly population, review the literature in the last 20 years to elaborate a relationship between SD and cognition. In addition, considering the influence of the COVID-19 pandemic, it is not unreasonable to speculate that sleep in the elderly may change following systemic changes caused by the virus [13]. Some possible mechanisms linking COVID-19, insomnia and cognition are introduced here.

The probability of undergoing surgical treatment increases with aging. The elderly often suffer from multiple comorbidities, increasing the incidence of postoperative complications [14]. These include sleep disturbances. Some authors believe that perioperative sleep disorders impair cognitive function; pain and opioids may also be related to changes in cognition. We will also explore a relationship between sleep disturbance, pain, opioids and cognition from a perioperative perspective and make some suggestions for perioperative sleep optimization.

2 Sleep disturbance

People with SD often have difficulty initiating or maintaining sleep, resulting in lasting effects into the daytime. Studies indicate a number of possible risk factors, including age, female sex, education level and socioeconomic status [15, 16]. Most were cross-sectional and could not explain any causal relationship. Therefore, more retrospective and prospective studies from different demographics with large sample sizes are needed.

2.1 SD and Cognition

Several studies indicate that SD impairs cognitive function (Table 1). Even if the causality remains to be determined, Yang et al. found an association between poor sleep quality and cognitive impairment in more than 2800 older adults [17]. In a study with the longest follow-up of 18 years, Behrens et al. found that sleep disturbance was associated with cognitive impairment later in life and that increased wakefulness after sleep onset (WASO) was a strong predictor of cognitive decline [18]. Moreover, a further study showed that difficulty falling asleep was associated with a decline in cognitive function, manifested in impairments of episodic memory, executive function, language and reaction speed [19]. This study simultaneously suggested that physical and mental health conditions, such as vascular disease and depression, may have a role to play in a relationship between insomnia and cognition [19]. It may therefore be sensible to consider prolongation of sleep latency and fragmentation of sleep as predictors of cognitive dysfunction. Baril et al. found that the severity of insomnia correlated significantly with global cognition and memory, especially when the brain of the older population was vulnerable to neurodegeneration [20]. In a study of 2,980 near-retirees, Teras et al. found that even though sleep difficulties were less severe after retirement, cognitive function still declined at an accelerated rate [21]. We speculate that this accelerated decline may also be closely related to the aging of this population. In addition, these two studies also suggest that as age increases, brain function becomes more sensitive to the impact of adverse external stimuli, indicating the importance of obtaining quality sleep in the elderly.

Table 1 Association between sleep disturbance and cognition in the elderly

The evaluations of sleep described above are based on questionnaires or face-to-face interviewing, leading to strong subjectivity. Some patients, especially the elderly, often failed to accurately recall their sleep, resulting in over- or underestimation [28]. There are studies using objective methods to test the relationship between sleep and cognition. Using actigraphy to record sleep in 703 subjects, Suemoto et al. found that insomnia and sleep fragmentation were associated with decreased cognitive performance [22]. Also using actigraphy in combination with sleep diaries Curtis et al. found that prolonged sleep latency and WASO were associated with poor cognitive function [23]. Although not related to executive function, Oury et al. observed a positive association (using polysomnography) between slow wave sleep (SWS) ratio and episodic memory in 135 community-dwelling older adults [24]. Studies involving objective sleep assessments often have a small sample size, which limits their widespread application.

2.2 SD and neurodegenerative diseases

In the elderly population, neurodegenerative diseases such as Alzheimer's disease (AD) have become an important factor threatening quality of life. Some authors suggests that SD may be closely related to the occurrence of dementia [25]. A meta-analysis showed that individuals with sleep problems had a much higher risk of Alzheimer's disease than those with healthy sleep and quantified a relative risk of 1.38 for AD in the insomniac population [29]. Huang et al. found that in the elderly with higher risk of dementia, the incidence of sleep disorder was significantly increased [26]. This blurs the causality between insomnia and cognition. Here we believe that there is a bidirectional association between sleep impairment and dementia. Insomnia causes an increased risk of dementia while sleep conditions further deteriorate as dementia continues to worsen. However, some researchers have come to mixed conclusions [30]. An 11-year follow-up study showed that difficulty maintaining sleep, one of the symptoms of insomnia, was associated with a lower risk of dementia and higher Montreal cognitive assessment scores [27]. The follow-up period of this study made it more convincing. However, the research involved a large number of participants over 70 years old, which may lead to a significant over- or underestimation of sleep. It is worth noting that some subjects will actively take drugs such as benzodiazepines after being diagnosed with insomnia, making it difficult for researchers to distinguish whether the observed decline in cognitive function is caused by insomnia, drugs or both. Future studies should also take into account the baseline age and medication status of the subjects.

In addition to the subjectivity to the assessment of sleep and cognition, confounding factors such as sex, occupation and education level may also interfere with the relationship between SD and cognition. In order to better describe/quantify the impact of SD on brain function, efforts are needed to eliminate the interference of possible confounding factors in future studies; this will also be beneficial in the implementation of individualized interventions.

3 Mechanisms

3.1 Metabolic-wastes-induced neurotoxicity

A full understanding of how SD causes cognitive impairment remains elusive. Holth et al. found that sleep deprivation increased cerebrospinal fluid tau levels [31]. In addition, Spira et al. observed an increased burden of the amyloid beta peptide (Aβ) in the brains of those with short sleep duration [32]. These pathological changes are consistent with neurodegenerative diseases like AD, suggesting that an increase in metabolic products in the brain caused by insomnia may be related to cognitive decline. Some authors believe that sleep can promote the removal of metabolic waste from the brain [33], while insomnia hinders this process, potentially causing neurotoxicity.

3.2 Neuroinflammation

Ren et al. found increased levels of cytokines such as interleukin-1β (IL-1β), IL-6, IL-10 and tumor necrosis factor α in the plasma of people suffering from chronic insomnia [34], indicating neuroinflammation is also involved in insomnia-impaired cognition. Some researchers believe the increase in proinflammatory cytokines is attributed to increased inflammatory signaling pathways such as that associated with activated protein-1 (AP-1), nuclear factor kappa B (NF-κB) and signal transducer and activator of transcription (STAT) family proteins [35]. Collectively these observations suggest that measures to alleviate neuroinflammation may effectively improve the pathological changes caused by SD.

3.3 Intestinal flora imbalance, oxidative stress and decreased BDNF levels

Wang et al. found that by inducing intestinal flora dysbiosis and mucosal barrier destruction, insomnia triggers systemic inflammation through a toll-like receptor 4/NF-κB pathway [36]. The role of gut microbiota in cognitive impairment deserves further study. Li et al. found candidate plasticity-related gene 15 (cpg15) can inhibit oxidative stress caused by sleep deprivation and plays a protective role, indicating that oxidative stress is also one of the mechanisms of brain function damage caused by insomnia [37]. In addition, Fan et al. found that decreased serum brain-derived neurotrophic factor (BDNF) levels may also participate in changes of sleep-related cognition [38].

3.4 How does cognitive dysfunction affects sleep?

We have discussed above that the relationship between cognition and insomnia is bidirectional. Cognitive impairment can in turn interfere with sleep [39]. Borges et al. suggest that there are multiple mechanisms involved, including dysfunction of circadian rhythm synchronization, cholinergic system dysregulation and lifestyle changes like reduced exposure to daylight and polypharmacy [40].You et al. found that among individuals with cognitive impairment, Aβ deposition in the brainstem and precuneus can damage slow wave sleep [41]. The effects of tau and corticothalamic circuit dysfunction in sleep deprivation caused by cognitive deficits have been studied in recent years [42, 43]. A negative feedback loop is formed between sleep disorder and cognitive impairment through some common mechanisms, which may mutually accelerate the progression of both.

3.5 SD and COVID-19

Some studies suggest that COVID-19 infection causes cognitive impairment that may be long lasting [44, 45]. How might COVID-19 infection produce these effects?

After entering the brain, the coronavirus can affect brain function through various mechanisms. Hellmuth et al. suggest that the virus directly damages neurons, causing cognitive impairment [46]. However, others suggest that indirect damage can better explain virus mediated cognitive impairment. One important mechanism is neuroinflammation. Older individuals with weakened innate and adaptive immunity are more prone to neuroinflammation after viral infection [47]. The STAT family, NF-κB pathway and IL may be involved in neuroinflammation induced by the virus [48]. Wu et al. found that dysregulation of angiotensin-II/angiotensin type 1 receptor (Ang-II/AT1R) signaling pathway has a role to play in virus induced neuronal apoptosis, neuroinflammation, oxidative stress and blood–brain barrier disruption [49]. As (membrane bound) angiotensin converting enzyme II is one of the targets for virus entry into the brain [50], we can speculate that the renin-angiotensin system may play a key role in virus induced cognitive dysfunction. Other mechanisms include cerebral vascular dysregulation, mitochondrial dysfunction caused by COVID-19 and traumatic changes secondary to acute respiratory distress syndrome [48, 51, 52]. The mechanism by which COVID-19 impairs cognition is complex and requires further exploration. For the elderly with existing cognitive impairments, brain protection measures during COVID-19 pandemic are necessary.

The mechanisms underlying mutual interference between insomnia and cognition are complicated, especially with the COVID-19 pandemic considered as another risk factor for cognitive dysfunction. Several mechanisms may overlap with those of neurodegenerative diseases including AD. Further studies to address possible pathways involved at the molecular and cellular levels are needed. These may additionally contribute to the treatment and prevention of neurodegenerative diseases (Fig. 1).

Fig. 1
figure 1

Potential mechanisms by which insomnia and COVID-19 impair cognition. Ang-II/AT1R angiotensin-II/angiotensin type 1 receptor, AP-1 activated protein-1, BBB blood brain barrier, BDNF brain derived neurotrophic factor, IL interleukin, NF-κB nuclear factor kappa B, STAT signal transducer and activator of transcription, TNF tumor necrosis factor

Both insomnia and COVID-19 infection impair cognition. Several mechanisms including the deposition of Aβ and tau, neuroinflammation, oxidative stress and changes in gut microbiota are involved. Signaling pathways like STAT family, NF-κB may also participate in this process.

4 Perioperative sleep disturbance in the elderly

We have discussed the impact of chronic insomnia on cognition in the elderly and analyzed some possible mechanisms involved. By focusing on the perioperative period, here we continue to explore the effect of insomnia on cognitive function. Perioperative sleep disturbance here mainly refers to the situation where normal sleep occurs during normal times but poor sleep occurs during surgery.

Aging of organs and a decline in physical function in the elderly have led to the emergence of various diseases. The probability of older people receiving surgical treatment significantly increases. Although the continuous advancement of surgical and anesthetic techniques has expanded indications for surgery, many older patients have reduced tolerance to surgery and/or anesthesia. In addition, the elderly often have multiple comorbidities, especially cardiovascular and respiratory diseases; these have effects of the prognosis of surgical treatment. For instance, the incidence of perioperative neurocognitive disorders remains high [53,54,55]. This will prolong hospitalization time and runs counter to the current concept of accelerated recovery after surgery. Unfortunately, our current understanding of the mechanisms underlying postoperative cognitive impairment are poor, resulting in no reliable treatments. Here we further explored the relationship between perioperative sleep disturbance and cognition. We also discussed optimization of perioperative sleep.

4.1 Perioperative sleep disturbance and cognition

Many patients who usually sleep well may suffer from insomnia after being admitted to hospital. A previous study showed that the incidence of sleep disturbance on the first postoperative night was as high as approximately 40% [56], and this requires further attention.

Many researchers believe that perioperative sleep disturbance is one of the factors promoting postoperative cognitive dysfunction. By establishing a model in older mice, Ni et al. found that preoperative sleep disturbance can exacerbate postoperative memory impairment [57]. Vacas et al. observed that applying sleep disturbance or surgical stimulation to mice alone could cause memory impairment, but no further aggravation of postoperative memory was observed when the two interventions were performed simultaneously [58]. Certain compensations may occur in the brain after establishment of sleep disorders, such as changes in the expression of neurotrophins and the reduction of neuronal apoptosis [59]. We speculate that any compensatory mechanism(s) in the elderly are not sensitive so meticulous perioperative care remains important.

A study conducted by Wang et al. in patients undergoing cardiac valve surgery showed that preoperative sleep disorder is an independent risk factor for postoperative delirium and can be used to predict the occurrence of cognitive impairment [60]. The results obtained by Han et al. in an elderly population suffering from non-cardiac surgery are similar to those of Wang et al. [61]. However, these findings only show the impact of perioperative sleep on short-term cognitive function. Chen et al. conducted a long-term follow-up of patients after breast cancer surgery and found that patients still experienced varying degrees of attention deficits related to sleep disorders and emotional problems 1 and 2 years after the procedure [62], suggesting the impact of perioperative sleep disturbance on cognition may be long-term. As a controllable facilitator, sleep deserves attention in surgical patients although the causes of postoperative cognitive impairment are not fully understood. Actively paying attention to and adjusting patients' sleep problems during the perioperative period may help to reduce the incidence of cognitive impairment postoperatively.

In contrast, a recent study in Parkinson's disease patients showed no significant change in cognitive function 1 year after deep brain stimulation between the preoperative SD and control groups [63]. However, the study did not describe postoperative sleep pattern. In addition, the influence of primary diseases on postoperative cognitive function may sometimes overweight that of sleep condition. Li et al. found in patients with epilepsy that sleep was significantly improved along with cognitive function; this was better than that seen preoperatively [64]. However, they did not observe a significant association between postoperative sleep and cognition, suggesting that the improvement of cognition was mainly attributed to the reduction in the number of seizures [64]. The study did not take into account factors such as postoperative pain, and the relatively small sample size may also explain the lack of association. Future studies should try to take possible confounding factors into consideration while expanding the sample size and extending the follow-up period.

4.2 Factors impacting sleep in surgical patients

As listed in Table 2, previous literature has shown that many factors can affect sleep in hospitalized patients [65,66,67]. For surgical patients, postoperative pain is undoubtedly the primary risk factor for disturbed sleep. Among many variables, demographic factors such as aging and female sex are not modifiable. However, other factors such as ward environment, pain and psychological disorders of patients can be improved through intervention.

Table 2 Risk factors affecting sleep in hospitalized patients

It is generally believed that with aging, the quality and quantity of sleep will show a continuous decline [68]. Therefore, for elderly patients, surgery and anesthesia are undoubtedly major insults and the damage to sleep may be irreversible. The reason why female patients are more susceptible to impaired sleep during the perioperative period may be that women have a stronger fear of surgery and anesthesia than men and are more sensitive to the external environment [69].

For individuals who usually have no psychological problems, lack of knowledge about the disease can induce fear, leading to anxiety, depression and other negative emotions after finding out that they are sick [70]. Sleep disturbances caused by such anxiety can be present even pre-admission and persist long after discharge [71].

For inpatients, sudden transfer from the usual home environment to an unfamiliar hospital ward may be one of the factors that affect sleep. In addition to unfamiliarity with the environment, ward staff conversations, monitor alarm sounds, intermittent measurement of vital signs, uncomfortable positions and inappropriate light may also affect the sleep experience; these combine to result reduced satisfaction during hospitalization.

Pain is a distressing experience reported by almost all surgical patients. Pain interferes with sleep and several studies have shown a link between pain and cognition. In a cross-sectional study pain was associated with impaired concentration [72]. Curtis et al. found that pain had a synergistic effect with sleep fragmentation where they combined to impair cognitive function [73]. These studies all indicate the necessity of providing appropriate analgesia in reducing postoperative cognitive dysfunction.

As one of the important means to deal with pain, opioids exert analgesic effect mainly by acting on the central and peripheral μ receptors. However, some researchers have found opioids can potentially impair sleep. Dimsdale et al. observed that acute opioid use significantly alters sleep architecture, reducing SWS duration [74]. Another study reported that remifentanil can shorten the duration of rapid eye movement sleep [75]. Furthermore, some studies have shown that the effects of opioids on sleep may be long-term, the sleep impairment caused by opioids persists for several months after cessation [76]. Conversely, poor sleep can exacerbate opioid abuse [77]. Groenewald et al. observed that short sleep duration was associated with an increased risk of opioid abuse [78]. Another large-scale study with a follow-up period of 12 years concluded that sleep deficits in adolescence may be one of the independent risk factors for opioid abuse in adulthood [79]. Therefore, when using opioids for people who usually have poor sleep, reducing the opioid dose as much as possible may be one of the strategies that can minimize (at least not exacerbate) the sleep impairment of this population.

In addition, opioids can also impair cognitive function. The study by Warnar et al. showed that opioids can induce occasional mild cognitive impairment, among which the impairment of attention is the most serious [80]. However, some authors have come to the opposite conclusion. Duprey et al. studied 560 elderly patients undergoing elective surgery and found that the use of opioids was not associated with the occurrence of postoperative delirium [81]. In contrast, a meta-analysis even showed that opioids improved cognition to some extent [82]. A discrepancy in the measurement of cognition and dosage of opioids may partially explain the contradiction between the above results. However, this contradiction still hinders our research into the causes of postoperative cognitive dysfunction. Trying to find and standardize a method for cognitive function screening specifically for opioid users represents major long term challenge (Fig. 2).

Fig. 2
figure 2

Perioperative sleep disturbance and cognitive function

Sleep disturbance causes cognitive impairment while the latter can further aggravate sleep disorder. Sleep disorder can be caused by various factors during the perioperative period such as ward environment and anxiety. Moreover, pain interferes with sleep and promotes opioid use. On the one hand, opioids improve sleep by relieving pain; on the other hand, opioids may exacerbate sleep impairment. Conversely, sleep impairment may be an independent risk factor for opioid abuse. Perioperative pain and opioids can promote cognitive impairment. Solid line: promote; dashed line: alleviate.

4.3 Management of perioperative sleep disturbance

4.3.1 Management of pain: multimodal analgesic strategy

Although opioids can effectively improve pain, we currently believe that they can adversely affect cognitive function in addition to disturbing sleep. Therefore, finding an appropriate analgesic regimen will have a beneficial effect on the patient both physically and mentally.

Many researchers are looking for a multimodal analgesic strategy to replace the traditional opioid-centered drug regimen, including the combined use of other analgesic drugs, the addition of nerve blocks and epidural analgesia. Many studies have obtained positive results. Zhang et al. found that the intraoperative application of dexmedetomidine in patients undergoing hepatectomy can significantly reduce postoperative oxycodone dosage and achieve better postoperative pain control [83]. In addition to effective analgesia, other studies have shown that the incidence of postoperative delirium was also significantly reduced after acetaminophen combined with dexmedetomidine was administered to patients undergoing cardiac surgery [84]. Moreover, es-ketamine, the S-enantiomer of ketamine, was also effective in reducing perioperative opioid consumption and improving postoperative recovery [85]. Epidural anesthesia and nerve blocks are also part of multimodal analgesic regimen. Jipa et al. found that epidural analgesia can reduce the occurrence of postoperative cognitive disorder on the basis of reducing the doses of opioids and improving analgesic effect [86]. Another study of patients undergoing thoracic surgery demonstrated the effectiveness of erector spinae plane blocks in reducing opioid consumption and cognitive impairment [87]. The advantages of definite analgesic effects, reduced trauma and minimal impact on the central nervous system, coupled with the popularization of visualization technologies such as B-ultrasound, the medication regimens and anesthesia techniques noted above should be seriously considered in perioperative analgesia.

While the analgesic regimens described in the above studies are proven effective in terms of pain relief, none of these studies have focused on postoperative sleep changes. Even though current studies have found that multimodal analgesia can improve postoperative sleep quality, increase sleep duration and reduce sleep impairment [88,89,90], they did not address the recovery of postoperative cognitive function and none of them could explain the causal relationship between postoperative sleep improvement and pain relief. There is currently a lack of studies on the association between multimodal analgesic regimens, postoperative sleep and cognitive function. Such studies would be of value for researchers examining the relative importance of pain, sleep disturbance and drug use in causing perioperative cognitive impairment.

The continued reduction of surgical incisions suggests that opioid-sparing techniques are both feasible and are being fully implemented. However, some studies note that opioid sensitivity is populations dependent [91, 92]. Non-opioid analgesics also have side effects, such as bradycardia caused by dexmedetomidine, gastrointestinal damage caused by non-steroidal anti-inflammatory drugs and hallucinations caused by ketamine. In addition, the nerve block technique also has certain contraindications like coagulatory dysfunction and infection. Therefore opioid-sparing techniques may not be suitable for all patients. On the basis of fully weighing the risks and benefits brought by different analgesic drugs and techniques, individualized perioperative analgesia should be the goal.

4.3.2 Management of other factors: non-drug interventions

Pre-operative education will enable patients to have a deeper understanding of their disease and this has the potential to reduce or even eliminate fear and anxiety. This can be a preferred option [93, 94] to reduce or eliminate the need for anxiolytics. In addition, a considerable number of patients' preoperative anxiety is attributed to the fear of anesthesia [95], such as fear of incomplete analgesia and the inability to wake up after surgery. Again preoperative communication/education between anesthesiologists and patients is critical. An interesting systematic review demonstrated that insufficient support from friends and family members increased the degree of anxiety [96], indicating the importance of social support in improving patients’ emotion during perioperative phase of treatment.

With respect to ward environment, unnecessary inspections and invasive monitoring methods should be reduced as much as possible. Admission education should be given to all patients. Patients, their families and ward staff should be encouraged to lower their voices whilst on the ward. Ward lighting should be adjusted according to the external environment instead of being ‘on’ for 24 h per day. We believe the above measures will significantly improve sleep of hospitalized patients.

5 Conclusion

In this article, we reviewed the effects of sleep disturbances on cognitive function focusing on the elderly. We briefly described mechanisms linking COVID-19, sleep and cognitive function. We also discussed the relationship between disordered perioperative sleep and cognition. Sleep disturbance is closely related to postoperative cognitive disturbance and the occurrence of neurodegenerative diseases in the elderly. In terms of mechanisms, neuroinflammation, oxidative stress and deposition of metabolic waste in the brain are still considered to be the classic pathways of SD-impaired cognition. In addition, as a new pathway connecting sleep and cognition, changes in gut microbiota composition and the gut-brain axis should be carefully considered.

Collectively, both acute and chronic sleep disturbances impair cognitive function. During the perioperative period, we should adopt a multimodal analgesic program to minimize the dosage of opioids while paying attention to the patient's emotions and the ward environment. Taking sleep as one target to improve cognitive function not only helps to prevent and treat neurodegenerative diseases and improve the comfort of perioperative patients, but also contributes to further research in the fields of sleep medicine and neuroscience.