Knowing what to do if you get a cramp while swimming turns a scary, painful moment into a manageable one. A cramp — a sudden, involuntary muscle tightening, most often in the calf or foot — is common in the water, especially for beginners. The key is simple: stay calm, float, and stretch it out. Here’s exactly how, plus how to stop cramps happening in the first place.

The short answer

If you get a cramp while swimming, don’t panic — it’s painful but not dangerous if you stay calm. Stop swimming and roll onto your back to float so you’re safe and can breathe. Then gently stretch the cramped muscle: for the common calf or foot cramp, straighten your leg and pull your toes up toward your shin until it releases, and massage it lightly. Once it eases, calmly swim or float to the poolside or shallow water and rest — don’t push straight back into hard swimming. Panic is the only real danger; floating removes it.

Step by step: handling a cramp in the water

  1. Stay calm. A cramp hurts and can be alarming mid-swim, but panicking is the actual risk. Remind yourself you can float and it will pass.
  2. Stop and float. Roll onto your back into a relaxed float so you don’t have to keep swimming on a cramped muscle — this keeps your face out of the water and buys you time. (If floating isn’t second nature yet, learn it: how to float on your back.)
  3. Stretch the muscle gently. Most swimming cramps hit the calf or foot. Straighten your leg and pull your toes and the ball of your foot up toward your shin, holding the stretch until the muscle releases. For a thigh or hamstring cramp, gently straighten or bend the leg to lengthen the tight muscle.
  4. Massage it. Lightly rub and knead the muscle to help it relax.
  5. Get to safety. Once the worst passes, calmly make your way to the poolside, a lane rope, or shallow water where you can stand or hold on, and rest.
  6. Don’t just carry on. A cramped muscle can seize again. Rest, stretch, hydrate, and only continue gently — or call it a day.

If you’re in deep or open water

The same rules apply, with extra caution:

  • Float first, always. Getting onto your back and staying afloat is priority number one — you can deal with the cramp from there.
  • Signal if you need help. If you’re struggling, wave one arm and call out; if there’s a lifeguard, let them help.
  • Head for the nearest safety, not necessarily the way you came — the closest edge or shallow point.
  • Never ignore cramps in open water. What’s a nuisance in a pool can be serious far from the side, which is one more reason never to swim alone.

Why cramps happen when you swim

Understanding the causes helps you prevent them. Common triggers:

  • Cold water makes muscles more prone to cramping.
  • Dehydration and low electrolytes.
  • Tired or overworked muscles — pushing too hard, too long.
  • Pointing your toes hard while kicking, which over-contracts the calf and foot — very common in beginners.
  • Skipping a warm-up, so muscles go from cold to working instantly.

If you’re also gassing out quickly, our guide on why you get tired so fast when swimming may help too.

How to prevent cramps

  • Warm up before you swim — a few easy lengths and some gentle stretching (see how to warm up before swimming).
  • Stay hydrated before and after, even though you don’t feel sweaty in the water.
  • Ease into cold water and don’t linger past the point of getting chilled.
  • Relax your kick. Keep your ankles loose rather than rigidly pointing your toes, and don’t kick frantically.
  • Build up gradually. Don’t jump from nothing to long, hard sessions; let your muscles adapt.
  • Rest and stretch afterward to help muscles recover.

An important note

This is general guidance, not medical advice. Occasional cramps are normal, but frequent, severe, or persistent cramping can have medical causes worth discussing with a doctor — especially if paired with other symptoms. If a cramp ever leaves you unable to get to safety, treat it as an emergency and signal for help.

Sources and further reading

The guidance here reflects widely recognized water-safety advice. For authoritative, detailed information, see:

This article is general educational information, not a substitute for professional training. Take a certified swimming, water-rescue, first-aid, or CPR course from a recognized provider, and in an emergency call your local emergency number (911 in the U.S.) and follow lifeguard direction.

The next small step

Before your next swim, add two habits: a short warm-up and a glass of water beforehand — two of the biggest levers against cramp. And practice the calf stretch (toes toward shin) on dry land so it’s automatic — if a cramp ever grabs you mid-swim, your body will already know the move that releases it.