I have learned to get up for a few minutes every hour and walk and stretch in all directions.
But the best thing that ever happened to me is my massage chair. I sit in there every day for 1/2 hr before bed and it has made a huuuuge difference. You can get these just to put on top of your existing couch or armchair also, you don’t need to buy an expensive whole chair. The first few models that came out were not so good, but the later models are quite good and work well.
I can feel my back adjusting, some days with the occasional small “pop” and when I go to sleep I am all relaxed and wake up without stiffness. You ought to try one, the things you can put on your couch are available in most every drug store and inexpensive.
I haven’t been to the doc with it, but my chair tells me that there is one spot in my spine that affects the area of my thigh directly that causes me pain. I focus on that spot, you can choose where and how the things massage… and the pain is completely gone for some time, a few days at a time.