The best sleeping position for back pain is on your back with a pillow under your knees or on your side with a pillow between your legs. These positions help to keep your spine aligned.