I have muscular skeletal issue’s lower soine injury, crush injuries to both legs...well its messy. I have endured spasms for decades. About ten years ago a bright helpful outward thinking Pharmcy Assistant suggested magnesium....there are some fabulousnpreparations available now and I have found one that helps a lot. As does massage, though with massage I have my tormentor avoid the damaged areas.
I suffer vicious neurological pain.
Perhaps explore magnesium