When you have back pain, sleeping can be hard. It can be a vicious cycle because when you don't get enough sleep, your back pain may feel worse. A poor sleep position can also aggravate back pain. Try lying on your side. Place a pillow between your knees to keep your spine in a neutral position and relieve strain on your back. If you need to sleep on your back, slide a pillow under your knees. Be sure to sleep on a comfortably firm mattress.