New research is putting a familiar idea under the spotlight: better sleep before surgery may set the stage for easier recovery. In studies looking at melatonin and Ambien, patients often had less pain, less anxiety and a lower need for opioids after the procedure. The results are not a green light for blanket use, but they do point to sleep as a surprisingly important part of surgical prep.
The findings were presented at the ANESTHESIOLOGY 2026 annual meeting and drew from 16 studies spanning abdominal, gynecologic, orthopedic, urologic, dental and other surgeries. Altogether, the evidence covered more than 1,100 patients, giving researchers a broad look at how pre-surgery sleep support might affect outcomes. The most striking pattern was simple: when sleep improved before surgery, recovery often seemed to improve too.
Melatonin was the more flexible of the two sleep aids studied. It was usually taken the night before surgery or shortly before anesthesia, with doses ranging from 1 mg to 20 mg. Across the studies, it was linked to less pain, lower inflammation and less anxiety, and in some abdominal surgery patients it was tied to more than a 30% drop in opioid use.
That is getting attention because melatonin is already familiar to many people as a gentler sleep option. Researchers also pointed out that it may be especially useful for older adults, who can be more prone to confusion after surgery. Some of the studies using activity monitors found better sleep patterns and a smoother recovery process in patients who took it.
Ambien, also known as zolpidem, showed a different but still notable pattern. It was typically given at 10 mg at bedtime, either the night before surgery or for a few nights leading up to it. In several cases, it helped patients with pre-existing sleep problems rest better before their procedures and was associated with less pain afterward.
The review also found that patients undergoing colorectal surgery who took Ambien needed less opioid medication during surgery and in the first 24 hours afterward. Lower inflammation was seen as well, which matters because inflammation can add to the discomfort that follows an operation. In hip replacement patients, the drug was linked with less anxiety, less depression and better satisfaction with recovery.
There is a catch, though, and it matters. The research was a scoping review, which means it pulled together existing studies instead of directly testing a treatment in a controlled trial. That makes the pattern interesting, but not definitive, and it leaves open questions about bias, long-term outcomes and which patients benefit most.
Researchers say the logic still makes sense. Sleep affects immune function, brain function and emotional balance, all of which can shape how pain is felt after surgery. When someone comes in exhausted, anxious or already dealing with chronic sleep problems, the nervous system may be primed for a rougher recovery.
Dr. Sebastian Amaya, a Yale anesthesiology resident involved in the work, pointed out that pain is not just a physical event. Environment, stress and biology all play a role, and poor sleep can disrupt the pathways tied to discomfort. He also noted that a lot of the hormones involved in sleep are involved in pain, which helps explain why better rest might soften the blow after surgery.
Another expert, Dr. Wendy Troxel of RAND, said the findings line up with what sleep science already knows about healing. Feeling nervous before a major procedure is normal, and short-term sleep support may help some patients get through that stretch more comfortably. At the same time, she warned that sleep medications are not a long-term fix for insomnia and should be used carefully.
That caution is part of the bigger picture. Opioids remain a standard tool for managing postsurgical pain, but greater exposure can raise the risk of persistent use later on. Anything that safely trims pain and lowers reliance on those drugs is worth a hard look, especially when it may start with something as ordinary as better sleep.
For people heading toward surgery, the practical message is pretty clear. Sleep problems should not be brushed off as normal background noise, especially when the body is about to go through a major stress test. A conversation with the surgical team or primary care doctor about melatonin, zolpidem or other sleep strategies may be one of the simplest steps before the operating room lights come on.
