Quality sleep is crucial to recovery following a surgical procedure. Evidence suggests that getting enough postoperative sleep while in the hospital may help with a person’s cognitive, respiratory, and immune function as well as their ability to tolerate pain.

People who have just undergone surgery commonly complain of sleep disturbances. Hospitals can be noisy and full of bright lights which can make it hard to fall asleep and stay asleep. Inflammation, lingering pain, and medications used during and after an operation can also disrupt sleep, even once a person is at home.

What Causes Insomnia After Surgery?

Insomnia following surgery can be caused by pain, inflammation, and medication side effects. The noise and bright lights of an in-patient hospital setting can also make sleep challenging for those who require overnight hospital stays.

People who experience insomnia have trouble falling asleep and staying asleep. About 10% to 15% of adults have chronic insomnia. However, many others experience short-term bouts of troubled sleep making insomnia one of the most common health complaints in adults.

Short-term insomnia, also known as adjustment insomnia, shares the primary symptoms of chronic insomnia though it is usually brought on by an acute stressor such as a job loss or a medical procedure like surgery. The symptoms of short-term insomnia typically resolve as the stressor fades.

Not everyone experiences the same sleep troubles after a surgical procedure. Sleep disturbances tend to be more common in people admitted to the intensive care unit. And major surgeries tend to cause more significant sleep issues than less invasive procedures. However, many different factors can contribute to trouble sleeping after surgery.


The most common reason people experience sleep disruptions after surgery is pain. Pain can make it difficult to sleep well and nearly all surgeries cause some level of pain.

Inflammatory Response

The body responds to surgery as it would any other injury. The immune system sets off an inflammatory response to help protect the body and prevent infection.

Major surgeries can sometimes spark a more extensive inflammation cascade that affects the whole body. This postoperative inflammation may contribute to the sleep disturbances many people experience after an operation.

Medication Side Effects

Some of the medications used during or after an operation can make postoperative sleep more challenging.

General anesthesia allows the surgical team to control pain and ensure a person stays still, calm, and unaware during the operation. Some evidence suggests that people, particularly older adults, are susceptible to sleep disruptions from general anesthesia.

Aside from anesthesia, several other types of medications used after surgery can affect sleep including certain antibiotics and steroids, sedatives, and some respiratory medications. People undergoing surgery who use beta blockers and those who take opioids for pain relief following surgery may experience difficulty sleeping as well.


Anxiety about surgical procedures, sometimes called acute procedural anxiety , can lead to sleep disturbances before and after surgery and intensify perceptions of pain.

The increase in pain and disrupted sleep caused by acute procedural anxiety can result in sleep deprivation. Unfortunately, sleep deprivation can exacerbate the pain and anxiety a person may already be experiencing.

Environmental Disruptions

People who need to spend one or more nights in the hospital following surgery often have to contend with a handful of disturbances that make it difficult to fall asleep and stay asleep.

Talking staff, phones and pagers, alerts from medical monitors, and loud equipment such as ventilators are all part of the hospital environment and create significant noise. The sound level at a typical hospital is often louder than the World Health Organization suggests for good sleep.

People staying the night in the hospital are also more likely to lack sun exposure during the day while getting too much light exposure at night. Changes in light exposure can disrupt a person’s circadian rhythm and make it harder to sleep at night.

Depending on a person’s condition, spending the night in the hospital after a surgery may also involve check-ins from nurses or other medical staff. While these interruptions are usually medically necessary, they can make it difficult to sleep well.

How to Get Better Sleep After Surgery

To enhance postoperative sleep, your health care provider may try to address factors causing your insomnia. This can include managing anxiety and pain, reducing environmental disturbances, and treating underlying sleep issues.

  • Anxiety management: If you find yourself struggling to cope with acute procedural anxiety in the days or weeks leading up to a scheduled operation, talk with your doctor. They may suggest treatments such as cognitive behavioral therapy, medications, or psychotherapy to help with your symptoms.
  • Pain management: Before your procedure, speak to your doctor about the expected recovery period and discuss ways to manage pain in the nights following your surgery.
  • Block out environmental disruptions: Improve postoperative sleep by eliminating as much environmental noise and light as possible. Some level of background noise and disruptions can be expected when spending the night in the hospital. However, simple tools such as eye masks, earplugs, and white noise may help enhance sleep quality.
  • Treat underlying sleep issues: For people who regularly struggle to get a good night’s sleep, taking time to address a pre-existing sleep issue can help improve sleep after surgery. For example, obstructive sleep apnea (OSA), chronic insomnia, and restless legs syndrome (RLS) are common sleep disorders in people who have been hospitalized.

Frequently Asked Questions About Surgery and Sleep

Is It Safe to Take Sleeping Pills After Surgery?

Sleeping pills and other sleep aids may help safely improve sleep after surgery but it is important to consult with your doctor first. Your doctor can help you determine if a sleep medication is necessary and which type is best considering taking into account any pre-existing conditions, your symptoms, and other medications you may be taking.

How Long Does Insomnia After Surgery Last?

How long insomnia after surgery lasts depends on the nature of the procedure and whether postoperative care involves an overnight stay at the hospital, but sleep disturbances following surgery are usually temporary.

The total time a person experiences insomnia symptoms after a surgery can vary. Typically, symptoms last a few days to a few weeks. Major surgeries tend to disrupt sleep more than minor procedures. A procedure that requires spending one or more nights in the hospital is also more likely to result in poor sleep.

In a small number of cases, short-term insomnia after surgery may lead to chronic insomnia. For example, a person may develop poor sleep habits when their sleep is disrupted after surgery.

When Should I Talk to My Doctor?

If you are struggling to sleep after your operation, talk with your doctor about your symptoms. They can review your medications and adjust your plan for pain management to help promote better sleep.

For people staying multiple nights at the hospital after a major procedure, your doctor can also help make adjustments to improve sleep quality that may include reducing nonessential treatments and check-ins at nighttime, decreasing nightly noise levels, and creating a regimen for light exposure.

Talking with your doctor early and often about any concerns about your procedure may help reduce the likelihood of sleep problems after the surgery.

Learn more about our Editorial Team

14 Sources

  1. American Academy of Sleep Medicine. (2014). The International Classification of Sleep Disorders – Third Edition (ICSD-3). Darien, IL.

  2. Bonnet, M. H. & Arand, D. L. (2022, April 15). Risk factors, comorbidities, and consequences of insomnia in adults. In R. Benca (Ed.). UpToDate., Retrieved May 31, 2022, from

  3. Winkelman, J. W. (2022, April 27). Overview of the treatment of insomnia in adults. In R. Benca (Ed.). UpToDate., Retrieved May 31, 2022, from

  4. Bonnet, M. H. & Arand, D. L. (2021, June 18). Evaluation and diagnosis of insomnia in adults. In R. Benca (Ed.). UpToDate.

  5. A.D.A.M. Medical Encyclopedia. (2020, August 13). Sleep and your health. MedlinePlus., Retrieved May 31, 2022, from

  6. MedlinePlus: National Library of Medicine (US). (2016, October 31). Surgery., Retrieved May 31, 2022, from

  7. A.D.A.M. Medical Encyclopedia. (2020, February 2). Immune response. MedlinePlus., Retrieved May 31, 2022, from

  8. Chakraborty, R. K., & Burns, B. (2021, July 28). Systemic inflammatory response syndrome. In StatPearls. StatPearls Publishing., Retrieved May 31, 2022, from

  9. Falk, S. A., & Fleisher, L. A. (2022, May 13). Overview of anesthesia. In S. B. Jones (Ed.). UpToDate.

  10. Luo, M., Song, B., & Zhu, J. (2020). Sleep disturbances after general anesthesia: Current perspectives. Frontiers in Neurology, 11, 629.

  11. Farzam, K., & Jan, A. (2021, December 13). Beta blockers. In StatPearls. StatPearls Publishing., Retrieved May 31, 2022, from

  12. Cohen, B., Ruth, L. J., & Preuss, C. V. (2022, May 11). Opioid analgesics. In StatPearls. StatPearls Publishing., Retrieved May 31, 2022, from

  13. Choy, Y. (2019, April 15). Acute procedure anxiety in adults: Epidemiology, clinical manifestations, and course. In M. B. Stein (Ed.). UpToDate., Retrieved June 8, 2022 from

  14. Choy, Y. (2022, June 7). Treatment of acute procedural anxiety in adults. In M. B. Stein (Ed.). UpToDate., Retrieved June 9, 2022 from


Learn More About Insomnia

Insomnia and Women

By Lucy Bryan March 25, 2024

Period Insomnia

By Jay Summer March 22, 2024

Postpartum Insomnia

By Lucy Bryan March 20, 2024

What Causes Insomnia?

By Eric Suni January 16, 2024

Can't Sleep? 8 Techniques You Can Do

By Lucy Bryan January 16, 2024

Keto Insomnia: Is It Real?

By Jay Summer January 9, 2024

close quiz
We Are Here To Help You Sleep.
Tell us about your sleep by taking this brief quiz.

Based on your answers, we will calculate your free Sleep Foundation Score and create a personalized sleep profile that includes sleep-improving products and education curated just for you.

Saas Quiz Saas Quiz