A back spasm can stop you in your tracks, but a combination of cold therapy, gentle movement, and the right body positioning can bring relief within minutes to hours. Most back spasms resolve on their own within a few days to two weeks, and what you do in the first 48 hours matters most.
Cold First, Then Heat
In the first two days after a spasm starts, cold is your best tool. Applying an ice pack or cold compress constricts blood vessels, reduces swelling, and numbs the area. It also directly decreases muscle spasms by slowing the chemical signals that keep the muscle firing. Apply cold for no more than 20 minutes at a time, four to eight times a day. Wrap the ice pack in a thin towel to protect your skin.
After those first 48 hours, switch to heat. Heat raises your pain threshold and relaxes tight muscles by increasing tissue temperature. Moist heat, like a warm damp towel or a microwaveable heat pack, tends to work better than dry heat for muscle spasms. A warm bath or shower can serve the same purpose. The goal is to loosen the muscle so it stops contracting involuntarily.
Over-the-Counter Pain Relief
Anti-inflammatory medications like ibuprofen and naproxen are the recommended first-line treatment for acute back spasms. They reduce both pain and the inflammation that can keep a spasm going. The American College of Physicians and the American Pain Society both place these ahead of prescription muscle relaxants, which haven’t been proven to work better for low back pain despite their reputation.
Prescription muscle relaxants like cyclobenzaprine are sometimes added when over-the-counter options aren’t enough. One study found that adding cyclobenzaprine to naproxen reduced spasm and tenderness more than naproxen alone. But a larger study of 867 patients found no meaningful difference at seven days between cyclobenzaprine alone, cyclobenzaprine with ibuprofen, or ibuprofen by itself. Muscle relaxants also cause drowsiness and other side effects, so they’re typically reserved as a backup option.
Positions That Take Pressure Off
How you position your body during a spasm can either feed the cycle or help break it. When you’re lying down, try these approaches:
- On your back: Place a pillow under your knees. This relaxes the muscles along your lower spine and maintains its natural curve. A small rolled towel under your waist adds extra support.
- On your side: Draw your knees up slightly toward your chest and place a pillow between your legs. This aligns your spine, pelvis, and hips, taking mechanical pressure off the spasming area. A full-length body pillow works well here.
- On your stomach: This is generally the hardest position on your back, but if it’s the only way you can rest, slide a pillow under your hips and lower stomach to reduce strain.
Resist the urge to stay completely still for days. Prolonged bed rest can actually slow recovery. Short rest periods combined with gentle movement tend to produce the best results.
Gentle Stretches for a Spasming Back
Once the sharpest pain has passed, usually within the first day or two, gentle stretching helps the muscle release and prevents it from locking up again. All of these are done lying down, which keeps the load off your spine.
Knee-to-chest stretch: Lie on your back with knees bent and feet flat. Pull one knee toward your chest with both hands while tightening your abdominal muscles and pressing your spine into the floor. Hold for five seconds, then switch legs. Finish by pulling both knees up together. Repeat two to three times per side.
Lower back rotation: From the same starting position, keep your shoulders flat on the floor and slowly roll both bent knees to one side. Hold for five to ten seconds, return to center, then roll to the other side. Repeat two to three times each way.
Pelvic tilt: Lying on your back with knees bent, tighten your belly muscles so your lower back lifts slightly off the floor. Hold five seconds, relax. Then flatten your back by pulling your bellybutton toward the floor. Hold five seconds, relax. Start with five repetitions and build up gradually.
Cat stretch: On your hands and knees, slowly arch your back upward like a cat, letting your head drop. Then let your back sag toward the floor while lifting your head. Repeat three to five times, twice a day. This one is especially good for restoring mobility after a spasm.
If any stretch increases your pain sharply, stop. A mild pulling sensation is normal. Sharp or shooting pain is not.
Hands-On Therapies
The American College of Physicians recommends massage, acupuncture, and spinal manipulation as non-drug options for acute low back pain. These aren’t just “nice to have” alternatives. They’re part of the official clinical guidelines, recommended alongside superficial heat as first-choice treatments before medication.
Massage works by increasing blood flow to the spasming muscle and mechanically encouraging it to relax. Spinal manipulation, typically performed by a chiropractor or osteopathic physician, aims to restore normal joint movement in the spine. Acupuncture may help by triggering the body’s own pain-relief mechanisms. All three have enough evidence behind them to be formally recommended for episodes of acute back pain.
What About Magnesium?
Magnesium supplements are widely recommended online for muscle spasms, but the clinical evidence is disappointing. A Cochrane review, the gold standard for evaluating medical evidence, found that magnesium supplementation provided no clinically meaningful reduction in muscle cramp frequency compared to a placebo. The percentage of people experiencing at least a 25% improvement was essentially the same whether they took magnesium or a sugar pill. Oral magnesium also caused digestive side effects like diarrhea in up to 37% of participants. Staying well-hydrated is more practically useful during a spasm episode than reaching for a supplement.
Preventing the Next Spasm
Back spasms tend to come back. The most effective long-term prevention strategy is strengthening the muscles that support your spine: the deep abdominal muscles (transverse abdominis), the obliques along your sides, the muscles running along your spine (paraspinals), and the gluteal and hip muscles. Together, these form the “core” that stabilizes your lower back during movement.
A systematic review of five studies found that core stability exercises reduced pain nearly twice as much as general physical therapy, with average pain score reductions of roughly 3 to 5 points on a 10-point scale. Patients also saw significant improvements in function and disability scores. The bridge exercise described earlier is a good starting point. Planks, bird-dogs (extending opposite arm and leg from a hands-and-knees position), and dead bugs (lying on your back and slowly extending opposite limbs) are other staples of core stability programs.
Consistency matters more than intensity. Ten to fifteen minutes of core work several times a week builds the endurance these muscles need to protect your spine during daily activities, which is what prevents the next spasm from happening in the first place.
Signs a Back Spasm Needs Emergency Care
Most back spasms are painful but harmless. A small number signal something more serious, like cauda equina syndrome, where the bundle of nerves at the base of your spinal cord is compressed. This is a medical emergency requiring immediate treatment. Go to an emergency room if your back pain is accompanied by:
- Difficulty urinating or having a bowel movement, or loss of bladder or bowel control
- Numbness, tingling, or burning sensations in your inner thighs, buttocks, or the backs of your legs
- Progressive weakness in one or both legs
- Difficulty walking
These symptoms together suggest nerve compression that can cause permanent damage if not treated quickly.

