The two issues may not be related. Spasms maybe due to malnutrition.
Please do not ignore green leafy vegetables and fruits in your diet...their deficiency can cause muscle spasms. Also, start a multivitamin tablet and
vitamin d3 sachets (once a week for 4 weeks).