What could be a reason for sharp muscle pains? I have taken stating meds for a few years, but pain started about a couple of years ago?

Need more data. Where? Which muscles? How long the pain lasts? What makes it better and what makes it worse? As you can see we need to know more to help you. Possible causes - inflammed muscle, electrolyte imbalance, myofascial pain, but your evaluation will help define these possibilities.