Melatonin and Sleep After Joint Replacement
A trial gave 48 hip and knee replacement patients melatonin or placebo for 7 weeks. Sleep scores did not differ clearly between the groups, and sleep stayed poor for weeks after surgery.
Sleep often gets worse around surgery. A 2026 randomised trial from the University of Utah asked whether melatonin helps, and tracked how sleep went before and after a hip or knee replacement. Melatonin made no clear difference. Sleep itself stayed poor for weeks.
Who was in the study?
- 48 adults having a first hip or knee replacement, enrolled between 2020 and 2023.
- 24 had a hip replaced and 24 a knee.
- 23 were given melatonin and 25 a placebo.
- Average age was 63 in the melatonin group and 61 in the placebo group.
- 31 were women.
- Over 1,600 patients were assessed for the trial. More than 90% were ineligible, most often because of an existing sleep disorder or sleep aid use.
- 74 were enrolled and 26 withdrew, leaving 48 for the results.
What did they do?
- Both groups took one tablet at bedtime, 3 mg of melatonin or a placebo.
- They started 1 week before surgery and carried on for 6 weeks after.
- Everyone got the same sleep hygiene handout.
- Patients and the care team did not know who got which.
- Patients logged hours of sleep, sleep quality and opioid pill use each day.
- The main outcome was the Pittsburgh Sleep Quality Index (PSQI) before surgery, then at 2 weeks, 6 weeks and 3 months. Lower scores mean better sleep.
Did melatonin make a difference?
Not clearly.
- There was no significant difference in sleep scores, sleepiness, sleep quality ratings or pain at any visit after surgery.
- Daily opioid pill use did not differ significantly (p = 0.36).
- Across all patients, hours of sleep did not differ significantly (0.21 h more with melatonin, p = 0.36).
- In hip patients alone, melatonin went with 0.75 h more sleep a night (p = 0.009).
- In knee patients alone, there was no significant difference.
The authors put the hip result down to chance. The groups were small, and two larger trials of melatonin, one in trauma surgery and one in joint replacement, found no effect on sleep scores. The trauma trial also found no effect on opioid use. The one difference at the start was the PSQI itself. The baseline table gives 5.6 in the melatonin group and 8.0 in the placebo group, and a later table gives 5.4 for the melatonin group.
How did sleep go around the operation?
Across all 48 patients, the average PSQI was:
- 6.7 before surgery
- 6.7 at 2 weeks
- 7.6 at 6 weeks
- 5.5 at 3 months
The study uses a cut-off of 5 or more to describe sleep as poor. The average was above it at every visit, including 5.5 at 3 months. Sleepiness scores followed a similar pattern and only fell clearly at 3 months. Pain scores were lower than before surgery at every visit overall, from 4.6 out of 10 before surgery to 1.7 at 3 months.
Was it the same for hips and knees?
No.
- Hip patients: PSQI went from 6.3 before surgery to 7.2 at 2 weeks and 9.1 at 6 weeks. It was 6.1 at 3 months. Pain was lower than before surgery at every visit (5.4 before, 2.0, 2.2, then 1.1).
- Knee patients: PSQI went from 7.2 before surgery to 6.4, 6.1 and then 4.8 at 3 months. Pain was higher at 2 weeks (4.2, from 3.7 before surgery) and lower than before surgery after that (3.0, then 2.1).
So hip patients had the faster pain relief and the slower return of sleep. The authors say sleep recovery did not follow pain scores.
What can't it tell you?
- Whether melatonin works. The trial planned for 128 patients to pick up a 30 minute difference in sleep and analysed 48. A smaller difference than that could be missed.
- Why people dropped out. 26 of 74 withdrew. The paper's text does not give the reasons.
- Who was tested. People with a sleep disorder, a sleep aid, alcohol or drug misuse, or calcium channel blocker use were excluded. The study ran at one centre.
- How much was taken. Sleep was self-reported, and tablet use was not tracked.
- A clean start. The groups differed on PSQI at the start. The models for the daily logs adjusted for age, BMI and baseline pain, not baseline PSQI, and the PSQI comparisons between groups were not adjusted.
Three of the authors report consulting for implant makers. The funding was internal. It is a randomised trial, so it can compare groups, but with these numbers the subgroup results are the weakest part.
What can you do with this?
This article is not advice on melatonin, which is a question for your surgeon or pharmacist.
What the study does show is that poor sleep around a joint replacement is common. If you're having one, tracking your own nights before and after gives you a baseline. A pulse oximeter overnight records your oxygen and pulse, and you can share the record with your doctor.
Not a medical device. Does not diagnose, treat or prevent any condition. Discuss results and changes with a clinician.
References
- Lancaster A, Blackburn BE, Loughmiller S, Archibeck MJ, Gililland JM, Anderson LA. Natural history of sleep before and after total joint arthroplasty is poor and unimproved by melatonin: A randomized controlled study. SICOT-J. 2026;12:53. doi:10.1051/sicotj/2026029