J.M.
Sleep on your side, and buy a body pillow. It always helped me to be able to wedge it between my knees (So that my top leg sagging doesn't pull my hip forward and twist my back) and hugging it, which did the same for my shoulders.
Make sure you are getting enough vitamin D... I never knew this, but a deficiency will cause back and leg pain. Who knew? Lol.