these can be provoked by an intense workout, even the lack of minerals. If the spasms don't hurt, it is normal and you should not worry, because they are result of an intense workout and some accumulation of lactic acid. If they do hurt, then it can be some calcium, magnesium or potasium imbalance.
In any way, you will need to consume more potasium, good source are bananas and potatos (not fried potatoes so that you don't commit a crime against yourself). I've read that taurine also helps by taking 3 or 4 g. before bedtime.