I have a hybrid latex foam mattress that’s medium-firm and I love it. My PT suggested rolling up a towel and taping it, but rolling up a feather pillow sounds more comfortable. I just purchased a lumbar pillow off Amazon (Cooling Gel Lumbar Pillow) that I use for the same purpose. I also sleep on my side with one of those contoured knee pillows (Memory Foam Knee Pillow on Amazon).
QL pain is awful, I’m sorry you’re going through this. I don’t have much to suggest other than using a leg/knee pillow like this one as it prevents your QL from overextending and getting strained while you sleep. Other than codeine, this is the only thing that helped me recover from a QL injury from powerlifting but I didn’t have gastroparesis at the time. Hope it can help.