If you find yourself popping Advil after a night of no sleep, you're not alone. Research has shown that our ability to withstand physical pain suffers when we don't get the sleep we need. But, be warned: According to a new study published in the journal Nature, painkillers don't work their usual magic when we're low on rest. Stimulants, the study suggests, might be a more effective way to combat pain during periods of sleep deprivation.

We know from experimental studies and clinical reports that the relationship between sleep and pain goes two ways: Chronic pain can make it tough to fall and stay asleep. And, on the flip side, people often demonstrate lower pain thresholds when they skip sleep. In one recent study, for instance, pressure on facial muscles only started to cause participants pain once they had been awake for 24 hours. And, in another study, researchers found that, when patients with burn injuries were discharged, those with insomnia were more likely than normal sleepers to develop chronic pain.

But the task of figuring out how sleeping and saying ouch interact has proven to be a tough one. We don't really know what poor sleep does to our brains and bodies that makes our pain receptors (technically called nociceptors) stand at attention. And there are plenty of other, more specific questions to dig into: For example, how do different sleep issues affect pain sensitivity, e.g., will your pain tolerance be lower after 24 hours without any sleep or after five days of insufficient sleep? Does poor sleep lessen your ability to withstand certain painful sensations more than others, e.g., being burned vs. being punched in the arm? And, to complicate things further, the answers to these questions probably depend on who you are; studies suggest that sleep affects pain tolerance differently for men and women.

But researchers are trying to make sense of the hairy phenomenon. In the above-mentioned study, researchers from Harvard Medical School and Boston-area hospitals used mice to investigate the impact of sleep loss on pain tolerance. While sleep-deprived mice aren't perfect stand-ins for their human counterparts, they do make for less complicated subjects. As researchers explained in the study, "both sleep–wake patterns and pain sensitivity are influenced by heritable traits, stress and the environment, making human experimental protocols that control for these factors almost impossible to achieve."

With mice, at least, researchers can manipulate study conditions to minimize the influence of additional factors. In this case, researchers devised a way to sleep-deprive mice in a non-stressful manner and ran a few different sleep-and-pain experiments. To look at acute sleep loss, they subjected a group of mice to two painful sensations (intense heat and mechanical pressure) at three different points: Before the mice were sleep-deprived, after roughly half a day without sleep and, lastly, after the mice caught up on their missed sleep. Researchers ran a similar experiment on chronic sleep deprivation, in which they partially restricted rodents' sleep for five days. And, finally, they looked at the impact of sleep fragmentation on pain sensitivity. So, rather than prevent mice from sleeping entirely, researchers just woke them up a lot so they were only able to get shoddy, disturbed shuteye.

Both acute and chronic sleep deprivation appeared to affect the rodents' ability to withstand heat and pressure (applied to the undersides of the mice's paws). In the chronic sleep deprivation experiment in particular, the mice grew increasingly sensitive to painful heat each day, whereas their sensitivity to intense pressure didn't show up until day five. And, in both experiments, pain sensitivity normalized once the mice got back to their regular sleep schedules. Sleep fragmentation didn't affect pain responses at all.

Researchers also tested the impact of drugs, both painkillers and stimulants, on mice's pain sensitivity.

First they administered ibuprofen and morphine to the acutely sleep-deprived mice to see if the drugs had the pain-relieving effects they typically would. No dice: Ibuprofen didn't reduce pain sensitivity at all and morphine did significantly less than usual.

Then they gave mice two different stimulants, caffeine and modafinil. The goal here was to see if the changes in pain sensitivity were a product of reduced alertness, rather than another aspect of sleep deprivation. And the results suggested that alertness is at least one factor. Both stimulants made the sleep-deprived rodents (but not the control group) less sensitive to pain, at least until their artificially induced alertness wore off. While the two substances work differently, they both target dopamine, suggesting that increased pain sensitivity from sleep deprivation has something to do with reduced dopamine signaling.

These findings expand researchers' grasp of the sleep-and-pain dynamic. They also have clinical implications for treating pain disorders. It's possible, for instance, that improving sleep in chronic-pain patients could make painkillers more effective.