If you are suffering from degenerative disc disease then they say that one of the best positions is to sleep on your stomach as this can relieve the pressure on the disc space. You should then place a flat pillow under your stomach and hips to help reduce stress on your lower back.
If you are suffering from spinal stenosis then try to sleep on your side with your knees curled up in the fetal position. This can help relieve pressure on the nerve root. If you are lucky enough to have a reclining chair or adjustable bed then this can be adjusted so that your head and knees are elevated to relieve the pressure on the nerve.
If you have pain from a herniated lumber disc then the most comfortable sleep position is really dependant on which disc is prolapsed. For a paracentral (the most common) it is better to lie on your stomach and for a foraminal it’s best if you sleep on your side in the fetal position.
However, in general elevating the knees slightly by placing a pillow under them while lying on your back can help many general forms of low back pain.