I get them pretty bad if I've gone for a long run or bike ride the day before and/ or if I'm pushing off the wall particularly hard. Obviously there are no walls if it's an ows and hopefully you won't have gone for a long ride or run the day before your race. Sometimes lifting my toes as hard/ high as they'll go will help relieve the pain and stretch the arch of my foot out but it's hard to get them to go away for good. Let me know if you find a solution!
I found that drinking more fluids before swimming helps prevent this for me. Also, if I get a foot cramp, I'll switch to breaststroke for awhile, so as to stretch the foot muscles.