What type of leg pain are you having? I get pain in both my legs at the same time when I fast. It starts in the calf muscle and spreads to the thighs and eventually the hips and it gets worse when I lie down.
I don't think my problem is potassium because the pains go away after I eat for a few days even though I haven't eaten any potassium (due to lack of vegetables in my diet - bad I know).