Hello!
Take muscle relaxants and NSAIDs.
Try simple over the counter ones such as ibuprofen or naproxen. If your muscle spasms continue then follow up with an orthopedician for a proper diagnosis of your condition.
Take care!
Often a few glasses of milk, together with a vitamin D3 supplement will solve the problem. Lack of calcium in the muscles is the most common cause. Thev D3 is necessary for nthe calcium to be utilized. Ocasionally it is low potassium. The most effective medication was quinine sulfate, which was available without prescription for a hundred years until the United States FDA recently made it prescription and advised for it not to be given for "charlie horses" because of a few fatalities in senior citizens who popped them like candy. I have quinine sulfate for my own use and if you are in good health without cardiac problems and use it reasonably it works well. I understand it is still available elsewhere in the world and still on the shelves in some health food stores.