My pain came on after a long flight in an uncomfortable airline seat (Australia to UK). Sitting for long or rising from a chair was painful.
The Physio diagnosed as stiff back, I could not bend far sideways or forwards as much as I can now. She worked on loosening my spine rocking etc. I am afraid I don't know the moves she used.
In between sessions I did a back stretch; lying on my back, bringing my knees up to my stomach and holding them strongly but not hard for a few seconds. It feels comfortable and good for your back. I did it in bed first thing in the morning and last thing at night, like a dog stretching before it starts the day.
As my hamstrings down the back of my legs were also tight I did an exercise for them. The books show you doing this leaning against a wall. Boring. I tended to do it leaning on the kitchen work surface scanning the news paper headlines, that's about long enough, or on the back of the chair looking at the TV. Fitted into your daily life like that you are more likely to do it. You put one foot forward extend one leg backwards with the foot flat on the floor (heel touching the floor,) the foot pointing forward and not bending the knee. Lean gently forward bending the front leg, don't strain the rear leg.
It got much better after the first physio session and bending etc is easier too.
Now I have no problem.