Yes, it hurts to lose sleep, as this NYT article states.
But sometimes pain can keep you awake or cause a fitful sleep.
If you have chronic pain, doing just the right amount of daily calibrated movement, like Restorative Exercise or Somatics, can lead to a better sleep. Better sleep can lead to decreased pain sensations and a natural analgesic reaction.
Something to think about. Or, better yet, sleep on!