Cramps after a swim

I didn’t over-do it or anything

I swam a couple laps ( it even a real lap, the hotel pool is super small) and I started getting some mild cramps. I got out and I’m laying on a chair and things have calmed down. Anything like that happens to you guys while trying to exercise?