How it worksFeaturesPricingBlogSymptomsSleep scienceFAQContact Download free
Home / Blog / Insomnia after anesthesia

Insomnia after anesthesia: why sleep breaks down after surgery

After an operation, sleep falls apart for a few nights even when pain is controlled. REM sleep nearly vanished in the first night in two small lab studies, and it came back within days at home.

By Jan Kohlhaas, founder & developer of SleepTrace · 10 min read · Updated Nov 2, 2026 · General wellness information, not a medical diagnosis

The short answer

Insomnia after anesthesia may not be caused by the anesthetic alone, because studies cannot separate it from the surgery itself, the hospital stay and pain. In two small lab studies, REM sleep was almost or completely gone on the first night after surgery. In one of them it fell from 18.2% to 1.2% of sleep and returned to pre-admission levels by the fourth night at home. In 2,005 hospital patients, total sleep time was 83 minutes shorter than at home and people woke 3.3 times a night instead of 2.0. Poor sleep before surgery is linked to worse outcomes, including delirium (pooled odds ratio 5.24). Confusion, hallucinations or sleeplessness that lasts for weeks should be reported to the surgical team or a doctor.

People are often surprised by the nights after an operation. They expected to sleep like a log after anesthesia and general exhaustion, and instead they lie awake, wake every hour or cannot get comfortable. The surprise is understandable and so is the worry. Recordings of sleep after surgery show what is going on, and the research says something about the causes, what recovers by itself and what deserves a call to the doctor.

Insomnia after anesthesia: the anesthetic is only one suspect

A common idea is that the anesthetic itself "scrambles" sleep. The studies that measured sleep directly cannot isolate the drug from everything else. They find that sleep is disturbed after surgery even with pain well controlled, with opioids avoided and under spinal anesthesia. A review of postoperative sleep names old age, other illnesses, the type of anesthesia, the severity of surgical trauma, postoperative pain and environmental stress among the factors linked to sleep disturbances. The same review reports that sleep disturbance after surgery goes with a higher risk of delirium, more sensitivity to pain, more cardiovascular events and poorer recovery, and says that sleep promotion may help but needs more evidence.

Su X, Wang DX. Improve postoperative sleep: what can we do? Curr Opin Anaesthesiol 2018. PMID 29120927

Can the anesthetic alone cause it? Possibly, along with several other things, and nobody has pulled them apart yet. The rest of the evidence is more specific.

What lab recordings show about the first nights

Two small studies recorded sleep with polysomnography before and after surgery. In the first, 10 adults aged 60 or older had a hip or knee replacement under spinal anesthesia with a plan that kept opioids to a minimum. They were recorded at home the night before, in hospital, and again at home on the fourth night after surgery. The average stay was 1.5 days. On the first postoperative night, REM sleep fell from 18.2% of sleep time to 1.2% (P=0.002), and time awake rose from 19.1% to 44.3% (P=0.009). The sleep architecture was more disturbed than before, and on the fourth night, at home, it had normalized. There was no association between the amount of opioid, pain scores or the inflammatory response and the sleep pattern.

Krenk L, Jennum P, Kehlet H. Sleep disturbances after fast-track hip and knee arthroplasty. Br J Anaesth 2012. PMID 22831887

The second study recorded 10 women having surgery for benign gynecologic conditions through a low abdominal incision. Six were treated with an epidural opioid, fentanyl, and four with an epidural local anesthetic, bupivacaine. Recordings were made the night before and on the first three nights after. REM sleep was abolished in every patient on the first postoperative night. By the third night it had returned to 9.8% in the fentanyl group and 12.9% in the bupivacaine group. Pain was well controlled throughout, and pain scores were not linked to any sleep stage. The authors concluded that postoperative patients suffer a profound sleep disturbance even when opioids are avoided and pain is well controlled.

Cronin AJ, Keifer JC, Davies MF, King TS, Bixler EO. Postoperative sleep disturbance: influences of opioids and pain in humans. Sleep 2001. PMID 11204052

REM sleep around surgery, share of sleep time (own chart)Joint surgery, before18.2%Joint surgery, night 11.2%Abdominal, night 10%Abdominal, night 3 (a)9.8%Abdominal, night 3 (b)12.9%
Own chart from two lab studies of 10 patients each. Joint surgery means hip or knee replacement under spinal anesthesia (Krenk et al.); abdominal means surgery through a low abdominal incision (Cronin et al.), where (a) is the group treated with an epidural opioid and (b) the group treated with an epidural local anesthetic. REM sleep was gone on night 1 in the abdominal study. In the joint surgery study it was back to its earlier level by night 4, not shown here because the study gives no number. Sources: Krenk et al., Br J Anaesth 2012, PMID 22831887; Cronin et al., Sleep 2001, PMID 11204052

Both studies are tiny, and both followed people who were having planned operations. They show a pattern, not a precise recovery timetable. The pattern is consistent: the first night is the worst by far, REM sleep is hit hardest, and things move back toward normal over the next few days.

The hospital is its own problem

A one-day survey of 39 Dutch hospitals asked 2,005 patients (median age 68) on regular wards about the previous night. Compared with a typical night at home in the month before admission, total sleep time in hospital was 83 minutes shorter, the number of awakenings rose from 2.0 to 3.3, and patients woke up 44 minutes earlier than usual. Altogether 70.4% were woken by outside causes, and for 35.8% of the patients that meant hospital staff. The disturbances people named most were noise from other patients, medical devices, pain and trips to the toilet. The survey covered all kinds of patients and not only surgical ones, and the factors it found are the kind that surround any hospital bed.

Wesselius HM, van den Ende ES, Alsma J, Ter Maaten JC, Schuit SCE, Stassen PM, de Vries OJ, Kaasjager KHAH, Haak HR, van Doormaal FF, Hoogerwerf JJ, Terwee CB, van de Ven PM, Bosch FH, van Someren EJW, Nanayakkara PWB, “Onderzoeks Consortium Acute Geneeskunde” Acute Medicine Research Consortium. Quality and Quantity of Sleep and Factors Associated With Sleep Disturbance in Hospitalized Patients. JAMA Intern Med 2018. PMID 30014139

It is a useful finding because most of those factors have little to do with the operation itself. Some of them, such as noise and visits from staff through the night, disappear when you go home, and the lab study agrees: sleep at home on the fourth night had normalized.

How to get over insomnia after surgery, as far as the evidence goes

None of these studies tested a particular fix for sleeplessness after an operation, so what follows is a reading of the findings and not a program.

  • Expect the first night to be bad and the next ones to improve. That is what the lab studies saw.
  • Treat pain as a sleep issue, and do not assume it is the whole story. Pain is on the review's list of factors, but in both lab studies pain scores did not track the sleep stages. Ask the surgical team about pain relief that fits your recovery, and do not change doses on your own.
  • Look at the environment. The survey's list of noise, devices and staff visits tells you what to ask about in the hospital.
  • Use the general routines with realistic expectations. General sleep hygiene routines are the usual starting point, although they were not tested after surgery in these studies.
  • Ask about medicines. Ask which of your medicines can affect sleep, and leave the question of sleep medicines to the surgical team or a pharmacist. Medications that cause insomnia lists the common culprits.

Joint replacement is a good example, because two of the studies here used it. A cohort of 994 patients having a total joint replacement found that worse sleep quality before surgery was correlated with more pain, less range of motion and worse function in the first days, and with a longer hospital stay. That is a reason to raise sleep at the pre-operative visit, particularly for someone already worried about insomnia after knee replacement surgery or a similar operation.

Luo ZY, Li LL, Wang D, Wang HY, Pei FX, Zhou ZK. Preoperative sleep quality affects postoperative pain and function after total joint arthroplasty: a prospective cohort study. J Orthop Surg Res 2019. PMID 31752947

Poor sleep and confusion after surgery

One reason to pay attention to sleep around an operation is delirium, a sudden state of confusion that can follow surgery, especially in older patients. A meta-analysis of 12 studies found that sleep disturbance before surgery was associated with postoperative delirium, with a pooled odds ratio of 5.24 (95% confidence interval 3.61 to 7.60); the pooled risk ratio in six prospective studies was 2.90. The authors point out that it is not yet known whether targeting sleep before surgery would reduce delirium.

Fadayomi AB, Ibala R, Bilotta F, Westover MB, Akeju O. A Systematic Review and Meta-Analysis Examining the Impact of Sleep Disturbance on Postoperative Delirium. Crit Care Med 2018. PMID 30222634

A pilot study that tracked 50 adults over 40 with wrist actigraphs for three nights before and three nights after major surgery found delirium in 7 of them (14%). Those patients had been awake for 44% of their sleep time the night before surgery, against 21% in the others, and the disruption carried on, and worsened, in the first two nights afterward. Nobody with less than 10% awake time developed delirium. It is a small pilot, and the authors said a larger study was needed.

Leung JM, Sands LP, Newman S, Meckler G, Xie Y, Gay C, Lee K. Preoperative Sleep Disruption and Postoperative Delirium. J Clin Sleep Med 2015. PMID 25979094

Confusion, seeing or hearing things that are not there, or not knowing where you are should be reported to the surgical team right away. Chest pain or trouble breathing after surgery needs urgent care. Call your local emergency number.

For nights that are just bad, the longer reading on the pattern is in Sleep fragmentation. If the weeks go by and the problem does not ease, What causes insomnia goes through the causes to discuss with a doctor.

Frequently asked questions

Sleep is disturbed after surgery under different kinds of anesthesia, and the studies cannot separate the anesthetic from the operation, the pain and the hospital. A review of postoperative sleep names old age, other illnesses, the type of anesthesia, the severity of surgical trauma, postoperative pain and environmental stress among the factors linked to sleep disturbance. In a small study of hip and knee replacement under spinal anesthesia, REM sleep almost disappeared on the first night regardless of opioid use or pain scores.

In the lab studies, the worst night was the first. In 10 older adults after hip or knee replacement, sleep architecture was back to normal on the fourth night at home. In 10 women after abdominal surgery, REM sleep returned partly by the third night, to 9.8% to 12.9% of sleep. These are small studies of planned operations, and bigger surgery, more pain or a longer stay may mean a longer recovery.

In a survey of 2,005 patients on regular hospital wards in the Netherlands, total sleep time was 83 minutes shorter than at home, people woke 3.3 times a night instead of 2.0, and 70.4% were woken by outside causes and 35.8% by hospital staff. The most reported disturbances were noise from other patients, medical devices, pain and toilet visits.

It is associated with worse outcomes in several studies. In a meta-analysis of 12 studies, sleep disturbance before surgery went with postoperative delirium (pooled odds ratio 5.24), and in 994 patients having joint replacement, worse sleep quality before surgery was linked to more pain and slower function afterwards. These are associations, and they do not prove that fixing sleep first would change the result.

Tell the surgical team early if you or a relative becomes confused, sees or hears things that are not there, or does not know where they are. Also raise it if sleeplessness continues for weeks, if pain keeps waking you, or if you wake gasping or choking.

SleepTrace is a wellness app, not a medical device. This article is general information, not medical advice. If your symptoms are frequent, severe or worrying, please talk to a doctor.


Pain, the hospital stay and the anesthetic all play a part, and a doctor should hear about sleep that stays bad. SleepTrace gives you a dated record of your estimated phases and any snoring or breathing pauses after surgery. It does not measure pain or medication effects; the record helps at the follow-up appointment.

Hear your own night. SleepTrace turns a night of audio into your sleep phases, the sounds you made, and how it all trends. Works without a wearable, better with one. Your phone on the nightstand is enough to start. Get it for iPhone or Android →

Keep reading

Get SleepTraceiPhone & Android · free to start
Download free