Acute pain in your rib cage is likely due to a ligament strain; however, if the pain is severe, see a doctor to identify more serious problems.
Steps
Method 1 of 4: Use Massage, Breathing, and Stretching

Step 1. Slow down if you are running and have a side cramp
Most of these cramps are related to vigorous exercise, such as running. Slow down when you feel the cramps. This will allow time for the cramps to go away on their own. If they don't go away, slowing down can help you use different methods to relieve the pain.

Step 2. Gently massage the cramp area
One of the fastest ways to get rid of side cramps is to massage the area using gentle pressure.
- Place your hand on the painful area, which is usually below the rib cage, on one side.
- Inhale and, as you exhale, pinch or squeeze this area with your thumb and other fingers. Apply pressure upward and inward, toward the center of your body.
- Relax your hands as you inhale, then reapply light pressure with your fingers as you exhale. Keep using this gentle massage for 5 or 6 breaths.

Step 3. Breathe in and out deeper and longer when you run or exercise
Taking in and out deeper will allow your diaphragm to relax and release pressure on your liver and intestines.
- Focus on bringing your breath into your belly, rather than your lungs. This will help to oxygenate your blood and relieve pressure on your organs.
- Also, you shouldn't use shallow breathing when exercising. Shallow breathing will keep your diaphragm lifted and can put more pressure on your ligaments.

Step 4. Try to synchronize your breathing pattern with your running pace
One theory about the origin of side cramps is that the rate of your breathing when you run influences the level of pressure in the ligaments that connect your diaphragm to your liver. Synchronizing your breathing with your movements should help to relieve all pressure on your diaphragm.
- Identify which side of your body hurts. For example, you may have cramps in your left side.
- Exhale when the foot on your non-painful side hits the ground. In this example, you would have to exhale when your right foot hits the ground.
- Inhale when the foot on your side that hurts hits the ground. In this example, you would have to inhale when your right foot hits the ground.
- Maintain this breathing pattern (exhale through the side that does not hurt, inhale through the side that does hurt) until the pain in the side subsides.

Step 5. Stretch the side of your body that has cramps
Stretches are important to relieve cramps. To do them, stop running or exercising. Then raise the arm straight on the side with cramps. Bend over to the opposite side to stretch your cramping side. Hold the stretch for 2 to 5 seconds. Relax and go back to stretching 3-5 times.

Step 6. Touch your big toes
Stop running or exercising, and try touching your big toes. This will help to relieve pressure in your abdominal area, particularly if there is trapped gas in your gut, which could cause cramps.

Step 7. When you run, bend over at a 45-90 ° angle at your waist
This will help to lower the pressure on your liver and reduce cramps. Run for approximately 15m with your body bent at the waist, then slowly straighten up to keep running.
Method 2 of 4: Modify Your Eating Habits

Step 1. Don't eat a meal 1 or 2 hours before running or exercising
Follow the 1 hour rule and wait at least that long before engaging in vigorous exercise. This will give your body time to digest.

Step 2. Do not eat foods made with wheat (such as bread or muesli) before exercising
If you feel like you have to eat or are concerned about having less energy during exercise, eat complex carbohydrates like a handful of berries or dried nuts like almonds half an hour before running or exercising.
Complex carbohydrates are good snacks to have before running or exercising, as they are digested in your small intestine and have a faster gastric emptying rate, which means they leave your stomach more quickly. This will avoid running or exercising on a full stomach

Step 3. Stay hydrated throughout the day and during all physical activity
Some studies indicate that side cramps could also be due to dehydration. Instead of drinking lots of water just before running or exercising, focus on drinking at least 8 glasses of water throughout the day. This will ensure you stay hydrated, even if you exercise vigorously.
Method 3 of 4: Seek Medical Attention

Step 1. Seek medical attention if you suffer from severe abdominal cramps on your right side, nausea, and vomiting
In some cases, if the cramps in the sides are strong (particularly on the right side) and arise with other symptoms, this may be a sign of a more serious condition. Among these we have the following:
- Appendicitis: Your appendix is on the right side of your lower abdominal area. If your appendix begins to swell due to an infection, this can cause severe pain on your right side, and could cause a fever. Your appendix will need to be checked as soon as possible to avoid a tear. Treatment includes surgical removal of the appendix and, if severe, possible treatment with antibiotics.
- Ovarian cysts: If you are a woman, severe pain on your right side could also be due to ovarian cysts. These cysts form on your ovary and can lead to ovarian cancer. Cysts can be removed by a surgical procedure called laparoscopy.
- To give you a diagnosis, your doctor will order a blood test and perhaps a CT scan of the abdominal area. Other diseases that cause similar pain include testicular torsion, ectopic pregnancy, intussusception, intestinal malrotation, and intestinal obstruction. Other causes in women include pelvic inflammatory disease and pelvic cysts or masses.

Step 2. Seek medical attention if you have severe pain in the upper right abdominal area, as well as the right side of your back, your right shoulder, or the right chest area
These could be symptoms of gallstones. Gallstones are stones that form in the gallbladder and can cause a lot of pain. However, these can be removed by a surgical procedure called a cholecystectomy.
Biliary disease is a condition that affects the right upper quadrant. This usually presents as a pain in the right upper quadrant that is due to the stretching of the liver capsule, and that arises with inflammation. Stones or an infection in the biliary tree can lead to this diagnosis. Usually, a blood test and an abdominal ultrasound are done to diagnose this disease. The fever could also be related. Surgery is also a treatment option for this disease

Step 3. Get medical attention if you have severe lower abdominal pain, cloudy or bloody urine, and a burning sensation when you urinate
These could be the symptoms of a urinary tract infection (UTI), which occurs when bacteria enter your urethra and bladder.
UTIs are more common in women. Women often get these infections after sexual activity or when using a diaphragm for contraception

Step 4. Go to the doctor if you feel pain in your left or right side, and you are pregnant
If pain persists, this could be related to an ectopic pregnancy. Ectopic pregnancy occurs when a fertilized egg implants outside the uterus, often in the fallopian tubes.
If an ectopic pregnancy occurs, you will feel pain depending on which side the egg implanted on. The only cure for an ectopic pregnancy is to end the pregnancy

Step 5. Talk to a doctor if you experience severe abdominal pain, stomach rumbling, and nausea or vomiting
These could be the symptoms of ulcerative colitis or stomach ulcers. Your doctor may prescribe medications to alleviate these symptoms.
- Stomach ulcers arise due to excessive consumption of NSAIDs, and can cause a lot of pain. Another cause of stomach ulcers is the H. Pylori bacteria.
- Gastroesophageal reflux disease could be another cause of your abdominal pain. You may require antacid treatment.
- Ulcerative colitis is rare for this type of pain, but it causes pain in the belly, along with diarrhea and inflammation of the intestine.
Method 4 of 4: Avoid Side Cramps

Step 1. Warm up before exercising
You should warm up your body no matter what type of exercise you plan to do. However, warm-up exercises are vital if you plan to run a lot or at a fast pace. Relax your muscles before running or exercising vigorously to avoid cramps.

Step 2. Make planks to strengthen your torso
Strengthening your torso will help to get your ligaments used to the pressure and tension. Planks are a simple but effective exercise to strengthen your abs.
- Place your hands in line with your shoulders on an exercise mat. Straighten your legs and spread them at the hips so that you are in a push-up position.
- Put your weight on your legs and the palms of your hands. Tighten the abdominal area.
- Hold the plank position for 10 to 15 breaths. Redo the exercise several times.

Step 3. Do a dumbbell exercise to strengthen your diaphragm
Perfecting your diaphragm should help reduce your chances of side cramps when running or exercising.
- Lie on your back on a weight bench. Keep your lower back flat on the bench.
- Raise a dumbbell slowly (use a low amount of weight) with your arms extended above your head. Stop moving the dumbbell if you feel your lower back start to lift off the bench.
- Keep your lower back on the bench and take 5-10 breaths. Then return the dumbbell to the starting position. Do this exercise again several times.

Step 4. Focus on your breathing when you run or exercise
Deeper, fuller inhalations and exhalations will lower the pressure on your diaphragm and keep you energized as you exercise.

Step 5. Rest assured that the cramps in the sides should disappear if you exercise constantly
Recent studies have shown that the more you run, the less often these cramps occur. What's more, as your physical condition improves, the likelihood of cramps and pain will decrease. So commit to a running or exercise routine, and overcome your cramps with your breathing, as long as they aren't too strong.