If you need to go under the knife, a key tool to prepare could already be in your bedside table.
One in nine people will have surgery in a given year. The night before, they’re often fasting, going over who’s giving them a ride, and packing a bag — but they may be missing a major advantage.
New research shows a simple trick can help with everything from pre-surgery anxiety, to pain, and better recovery over all. Decreasing that pain can significantly lower the amount of painkillers required, slashing risk of dependence.
How? Use an aid, like over-the-counter melatonin or prescription Ambien, to get a good night’s sleep before surgery, suggests an new analysis presented at the 2026 Anesthesiology meeting.
“While we usually focus on what happens in the operating room, our review suggests we may be overlooking a critical window for improving outcomes in the nights before surgery,” senior author Dr. Sebastian Amaya said.
“Something as simple as improving sleep before a procedure can help patients have a more comfortable recovery while reducing the need for heavy painkillers and their potential risks.”
It seems sleep really may be the best medicine.
The connection between sleep and opioid addiction
Experts say that people often lay awake in bed before surgery, anxious about their upcoming procedure. Lack of sleep actually leads to increased sensitivity to pain, making doctors prescribe more painkillers like opioids to deal with it.
The more exposure to opioids, the higher the risk of addiction.
“When opioids are provided too long or at higher doses than necessary, we do see complications and that includes the development of addiction,” addiction medicine specialist Dr. Holly Geyer told Mayo Clinic.
“That’s the brain’s desire to continue receiving that opioid outside of the original reason it was prescribed. We also see evidence of tolerance, the need to go up higher and higher on your dose, to receive the same high and/or level of pain relief as before.”
This new research suggests that simply getting a bit of help for a better night’s sleep can minimize this harmful chain of events.
Melatonin vs. Ambien
Researchers looked at 16 studies of patients undergoing abdominal, gynecologic, orthopedic, urologic, dental and other surgical procedures published between 2000 and 2025.
They found that melatonin, taken in doses from 1 to 20 mg, was associated with less anxiety, pain and inflammation and a shocking 30% reduction in opioid use in some abdominal surgery patients.
In the studies, patients typically took melatonin the night before surgery and/or 20 to 90 minutes before going under anesthesia.
Melatonin is an extremely popular over-the-counter supplement used by over 5 million adults and 4 million children at least monthly as a sleep aid. Melatonin occurs naturally in our body and has a more gentle effect compared to prescription sleep aids, like Ambien.
“Melatonin may be particularly valuable for patients who experience significant anxiety before surgery, those at higher risk for respiratory complications and older adults who may be vulnerable to cognitive side effects from traditional sedatives,” said Amaya.
Studies that took data from smart watches suggested that melatonin helped patients return to normal patterns of sleep and daytime activity after surgery, too.
That said, Ambien was also effecting in helping with sleep before surgery, and linked to less pain after surgery.
One study showed that patients who took Ambien and underwent colorectal surgery needed less opioid pain medication during and in the first 24 hours after the surgery. They also had lower levels of certain inflammatory markers.
Another showed that patients undergoing hip replacement also reported less anxiety and depression while also having a better recovery experience, after taking Ambien.
While melatonin is a more gentle option, “Ambien may be better suited for patients with preexisting insomnia or significant sleep disruption,” Amaya said.













