Hi, two things to be taken into consideration
1.Doing exercise correctly and with calculated resistance while doing strength n weight trainings at gym.
2.Not overdoing and exercise for fast results!
You past history suggests anynone or both of above, probably resulting in spasm.
Next Steps
1.Avoid long continous posture of sitting sessions.Take regular breaks for hydration and stretching.
2. Do not leave your foot dangling on ground instead use a stool at feet to give proper rest and support.
3. keep your back straight while sitting.dont half sit in chair use back support of chair.
4.Start you day with at least 30 minutes of yoga (surynamaskar)
5.For personalised back regime(based on your need) you can contact us.
Health Tips
Take a good diet including a fruit, green veggies and 2-3 litres water in a day to keep u hydrated and keep your muscles strong.