One can get the muscle groups out of balance and create chronic back pain. Usually, back pain has a structural component. There is a disk or a bony defect in the spine that is the root cause.
As long as you do not have continuous pain that runs down one leg only, medical intervention can be avoided by using common sense.
Bed rest is good, but only for one day at a time. You must remain mobile.
I hope that all is well now.