Have you checked your Vitamin D levels with a 25-hydroxy-vitamin D (25 OH vitamin D) blood test?
Also...increase your magnesium. Add Epsom salt baths or foot baths for magnesium.
I suggest first seeing an Orthopedic Dr.
The compression of nerves after they leave the spinal cord can cause leg spasms. Spinal nerve compression can create conditions that affect the spinal column, such as osteoarthritis, spinal tumors and herniated disks. These usually affect nerves that run through the legs, which may trigger leg spasms. Leg spasms usually worsen when sitting for long periods of time or doing strenuous physical activities. Individuals who experience frequent leg spasms may need to consult a physician for advice on spinal conditions that can trigger leg spasms.
Has your Dr. checked your Electrolytes? It could also be caused by an electrolyte imbalance. Electrolytes are chemicals in the blood that regulate important body functions. When you sweat during exercise, potassium, calcium and magnesium levels are depleted. Certain medications may also affect the chemical balance of these nutrients, which can create leg spasms. To prevent leg spasms, you should eat balanced meals to adequately supply nutrient levels and prevent leg spasms. If you're on medication may need to monitor their blood levels to ensure that electrolytes are balanced.
Do you exercise? Poorly conditioned muscles may contribute to leg spasms. Researchers do not understand the exact cause of leg spasms, they believe that out-of-shape and weak muscles are more likely to cause muscle spasms. Muscles are bundles of fiber that relax and contract to move the joints and bones of the skeletal system. The signal to relax or contract is transferred by nerve cells that communicate with cells within the muscles. Poorly conditioned muscles lack muscle and nerve communication, which can alter normal nerve reflex functions, which can lead to leg spasms. You should participate in regular physical activity to reduce the likelihood of leg spasms and strengthen muscles within the leg region.
If the above doesn't help, meaning seeing an Orthopedic Then I would see
a Neurologist.