Eventually you'll need to fine tune the program according to your needs. Becoming A Supple Leopard is basically the encyclopedia for mobility programs/exercises: https://www.amazon.com/Becoming-Supple-Leopard-2nd-Performan...
You likely have a deeper physiological problem that the physical activity is bringing to the surface.
I can't help though, because I don't have mobility/physical issues and so I don't research it much. My friend who is very smart and has mobility/back issues says that this is the best book on the topic in the world, though: https://www.amazon.com/Becoming-Supple-Leopard-2nd-Performan...
I lift on the regular, train with a PT that specializes in mobility and strength who works with pro athletes. If I don't adhere to a nightly, consistent stretching regiment before bed that includes a bit of yoga and a number of other key movements, I sleep like poo.
Highly recommend the book; Becoming a Supple Leopard [1]
[1] https://www.amazon.com/Becoming-Supple-Leopard-2nd-Performan...