Regarding the calf spasm, you can often curtail it by grabbing your foot and pulling the toes upwards to flex the entire foot (the opposite of pointing it). That forces your calf muscles to relax because their opposites are engaged. It will not stop the residual pain. But it's handy to know because many times you'll be on the edge of another spasm or several for the next hours-to a couple of days, and you can head it off if you immediately flex your foot to prevent the muscles in your calf from tightening.
I think potassium can help some people but low potassium will not help everyone and isn't always the cause. I am sorry though. I get those a lot, though usually now the warning tightening will wake me up and I immediately go to lean against the wall to flex my foot or do it manually to stave it off. Be careful about massaging or rolling immediately after a spasm. For some folks and in some situations it will send you right into another one.