Memory Foam has helped me immensely but I have to see a chiropractor now for the spine pain that comes with having a bed that has so little firmness to it and the fact that i've been lying in bed a large portion of the last few years
So i spend most of my days lying back in bed (listening to audiobooks most of the time) and I have this one very soft pillow that helps, keep it under my back from just below my neck to the base of my spine, much softer than memory foam pillows, and have a somewhat balled up sheet under my neck and head, adjusting how balled up based on how high i want my head, this has really helped the spine pain.
Also, cold packs 10x13 inches size, across my back helps back pain, I use two at a time, lie on my front for 15-20 min with the cold pack or packs on my back and a t-shirt on so it doesn't get too cold since direct contact with cold packs isn't advised in such a situation. I also use a TENS unit, an electrical pain relief device, at the same time with the coldpacks on top pressing down on the two pads, or four pads if I'm using two cold packs. Place the pads across my back and usually place the pad on a spot that is sore or painful to do the most pain relief. They help, not perfectly but they certainly do help, I usually use this at some point in the hour before bed.
As far as what mode i set the tens unit to I use the one that puts out a very constant stream of electricity, as steady as possible with as few increases or decreases in power, then I turn it up till it's at a point where it's too much then bring the power back down enough so that it's just below that and is bearable but is strong. That's the way they do it at my chiropractors office and I've adopted it myself.
All the best