You might be sitting on the couch, feet up on an ottoman and watching TV, when BAM!, it suddenly feels as if your big toe is curling in, wrenching the entire top half of your foot into a painful cramp. Toe cramps can happen to any of the digits at the end of your foot, painful and unpleasant no matter which little piggy is cramping up.

Toe cramps, which happen when the muscles that flex and bend your toes involuntarily contract, are fairly common and can happen any time, even in the middle of the night, waking you up from an otherwise sound sleep. But what causes these weird spasms, and more importantly, what can you do to avoid the ouch?

What causes toe cramps?

“Pain is the body’s best sign that something is going awry,” says Sondema Tarr, DPM, a board-certified podiatrist and foot surgeon at Direct Podiatry Arizona in Tempe. In most cases, there are easily fixable reasons behind your cramping feet.

    What can I do to avoid toe cramps?

    First, pay attention to your shoes. Any shoes that cause pain or lead to toe cramps should probably be retired. Replacing them with shoes with a lower-heel that helps you walk more naturally is the ideal solution, though Dr. Tarr admits that may not always be possible, especially if you have to wear dress shoes for work. “Finding shoes that won’t give you cramps involves some trial and error,” she says. “One good idea is to bring a pair of flatter shoes and wear them when you are sitting at your desk, and only change into them when you need to.”

    When choosing new shoes, Dr. Schaeffer recommends buying ones with plenty of room in the toe box, good arch support and a stable heel cup. "Insoles are another great option to add or enhance support and stabilize our feet," he adds that a podiatrist can also prescribe custom fitted orthotics/insoles.

    Another key to preventing toe cramps is staying hydrated. Drink a glass of water before working out, and bring a refillable bottle, so you can stay hydrated while you exercise.

    Top Electrolyte Powders
    Electrolyte Drink Tablets
    Nuun Electrolyte Drink Tablets
    Now 14% Off
    Electrolytes Powder
    KEY NUTRIENTS Electrolytes Powder
    Now 25% Off
    Electrolyte Supplement
    Now Sports Electrolyte Supplement
    Now 34% Off
    Electrolyte Powder Packets
    DripDrop Electrolyte Powder Packets
    Now 11% Off

    Plus, if you’re on a very low- or no-salt diet, talk to your doctor about making sure you have enough sodium. In addition to adding more potassium rich-foods to your diet, including bananas, avocados, coconut water and almonds, consider adding an electrolyte supplement to your water.

    How can I get relief from a toe cramp?

    When that toe cramp hits, it can make you feel frozen in pain for a moment, but there is plenty you can do to relieve the pain.

    1. If you happen to have a tennis ball (or a ball made for plantar fasciitis, like this one) within reach, roll it along the sole of your foot — it can help release the muscle and lessen the spasms and cramps, suggests Dr. Tarr.
    2. No ball nearby? Cross the leg attached to the toe with the spasm over your other leg, then gently flex the foot back, hold it for two to three seconds and release.
    3. If your foot and toe are still in pain, try a warm soak or using a heating pad, suggests Dr. Schaeffer.
    4. Drink down a glass of water to rehydrate, and hopefully your foot will feel fine in a matter of minutes.

    Can toe cramps be a sign of something more serious?

    While toe cramps are very common and almost always no big deal, you should take note if they seem to be happening more and more often, says Dr. Schaeffer. "It is very important to get blood work done by your primary care physician to check your potassium, calcium and magnesium levels and to make sure things are normal internally,” he says.

    Dr. Tarr adds that recurring cramps can sometimes be a sign of circulation issues, but there would usually be other signs along with the toe cramps, including cramps in your calves and upper legs. In some cases, cramps could be a sign of neuropathy or peripheral arterial disease (PAD), which is usually related to diabetes or stroke, she says.

    But in most cases, toe cramps are simply a sign you need to drink more water and slip into more comfortable shoes.