It will surprise no one that being in pain makes your sleep worse. Whether caused by a herniated disc, an ear infection or a toothache: pain makes it harder to both fall and stay asleep.
Now there’s evidence that the opposite is also true: poor sleep makes pain worse. Researchers in Saudi Arabia tested people suffering from severe obstructive sleep apnea (a condition in which people choke on their throats during sleep and have very poor and fragmented sleep). The patients were exposed to an uncomfortable heat source after a night without treatment, and then again after sleeping while being treated with CPAP (a device which blows air into the throat, propping it open).
The researchers found that the patients were less sensitive to pain after sleeping with the CPAP on than they had been after a night of not wearing it.