You can try the following at-home remedies to help relieve lower back pain while sleeping:
Use a supportive mattress: A firm mattress can help relieve lower back pain.
Sleeping on your side with a pillow between your knees can help keep your spine in a neutral position and reduce strain on your lower back.
Sleeping on your back with a pillow under your knees can also help relieve pressure on your lower back.
Avoid sleeping on your stomach as it strains your lower back and may aggravate your pain.
Stretching your back and hips before bed will help release tight muscles and improve your sleep posture.