Me no doctor, but I've had serious back problems for 25 years and still sail a lot. I suspect every single back problem is different, as it is an extremely complex 'joint'...
I find the boom height makes a difference here. Just half-inch is a bit deal for me (i.e. a bit higher and I hang more and feel better, I think). Harness position too, of course.
I also find small things like varying the grip once in a while helps, from under to over, etc. Probably changes the muscle usage, not sure. Do not sail for a mile before gybing: at first do a few tacks to see how the back will be before you go too far.
If the pain is smack in the middle of the spine, acute or gets worse with certain movements: stop right there, see a pro. Just to be on the safe side. Nice generic advice, huh?
If the pain is like cramps, asymmetrical, more like on the side of the spine than the spine itself: then one hopes it's only a muscle strain of sorts and will go away with plenty'o time and loving care.
In all cases, lying on the back with the legs up, and sometimes sleeping with a pillow between the hind legs

helps rest the lower back area.
All the best mate.