Good morning ma'am,
First understand the pain, pain is just a symptom that indicates something not normal is the anatomical / physiological / biomechanical properties.
Taking analgesic/muscle relaxants will spread the problems not the root cause.
So, better consult a physiotherapist, He/She will examine you and give you a better care.
From your questions, I assume it might be a some improper musculature in the back and sides of trunk . Sometimes it may be biomechanical back pain caused by hamstrings ( back thigh). It may be stiffened or weakened..
Next Steps
Visit a experienced physio and get a consultation from them. They will start with the pain management. Then followed by streches and strengthening exercises.