Patients who take melatonin or Ambien before surgery may experience less pain, lower anxiety and a smoother recovery, according to a review of existing research presented at the ANESTHESIOLOGY 2026 annual meeting in San Diego. The analysis, which examined 16 studies covering more than 1,100 patients, suggests that improving sleep in the period before an operation could reduce reliance on opioid painkillers afterward.
The studies reviewed involved patients who underwent abdominal, gynecologic, orthopedic, urologic, dental and other procedures between 2000 and 2025. Melatonin was typically taken the night before surgery or 20 to 90 minutes before anesthesia, at doses ranging from 1 milligram to 20 milligrams. Ambien, known generically as zolpidem, was consistently dosed at 10 milligrams and taken at bedtime either the night before the procedure or for several nights leading up to it.
Although both drugs are used to aid sleep, they work differently. Melatonin is a hormone the body produces naturally to regulate the sleep-wake cycle. Ambien acts on GABA-A receptors in the central nervous system to produce a sedative effect. Across the studies, melatonin was associated with less anxiety, pain and inflammation, and a reduction of more than 30% in opioid use among some abdominal surgery patients. The analysis also suggested melatonin may offer advantages over traditional sedatives for older adults, who can be more vulnerable to post-surgical confusion.
Ambien appeared to help patients with pre-existing sleep problems rest better before surgery and was linked to less pain afterward. Patients who had colorectal surgery and took Ambien required less opioid medication during and in the first 24 hours after the procedure, and they showed lower inflammation levels. Those who underwent hip replacement reported less anxiety and depression and greater satisfaction with their recovery.
Dr. Sebastian Amaya, senior study author and a senior anesthesiology resident at Yale School of Medicine, said the results did not surprise him. He described sleep as «extremely important» for overall health, immune function, cognitive performance and emotional well-being. «Pain is ultimately an experience,» Amaya said, noting that a person's environment and individual circumstances can influence how pain is felt. Sleep also plays a role in brain processes involved in pain perception, he added, and many of the hormones tied to pain are also involved in sleep. «If you have insomnia, if you have other chronic sleep issues, all these different biological pathways can be disrupted, and that could lead to increased pain after surgery,» he said.
Opioids are commonly prescribed to manage pain after surgery, and research has linked greater post-surgical opioid exposure with a higher risk of persistent use. While the possibility that better sleep could reduce opioid consumption is promising, Amaya cautioned that the findings are not conclusive. Many of the studies showed decreased pain and lower opioid use in the immediate post-operative period, he said, but patients were not followed for the following days. He said that would be a subject for another study.
Amaya said the goal is to get patients out of the hospital as soon as possible while keeping pain under control. Improving sleep before surgery may be «low-hanging fruit,» he said, particularly because modern lifestyle factors such as blue light and noise can interfere with rest. «There are probably a lot of people who actually have poor sleep quality, and that can play a role when they come to surgery and have post-operative problems, like a lot of pain,» he said. Better sleep hygiene or a conversation with a primary care physician could help optimize rest before a procedure.
Dr. Wendy Troxel, a licensed clinical psychologist and senior behavioral scientist at RAND who was not involved in the study, said the findings «make sense» from a sleep perspective. «We know how important sleep is for healing and recovery, and it's very normal to feel anxious and sleep poorly before a major medical procedure,» she told Fox News Digital. «For some patients, a short-term sleep aid around the time of surgery may help.» Troxel noted that sleep medications are generally not recommended as a long-term solution.
Because the work was a scoping review, which summarizes existing research rather than testing a treatment directly, the authors could not make clinical recommendations or fully assess the risk of bias in the underlying studies. They said more research is needed.