Pain and cramping during later stages of pregnancy is not uncommon.
The likely causes for this pain would be:
Braxton-Hicks contractions: the uterus has these pseudolabour contractions which can be painful occasionally.
Gas pains: due to the slowing of intestinal passage of food, there are gas pains and bloating. This seems most likely in your case.
Pressure of growing uterus: As the uterus grows in size, it puts pressure on the surrounding organs and this can cause pain.
Constipation: increased constipation during pregnancy is often the cause of pain.
Gas pains are the most likely. You can take Cap. Prilosec for now. But you should also discuss with your doctor for this.
Meanwhile take the followings steps:
Plenty of fluids - make sure you are well hydrated.
Warm compresses: warm a towel and apply it to the area.
Soak in a warm bath
Change positions - do not remain in the same period for long
Left lateral position - at night while sleeping sleep in the left lateral position.
Vt. C, Zinc and Vitamin B complex supplements -you can get this at your pharmacy.
Avoid smoking, avoid alcohol, cut down on caffeine
High fiber diet -vegetables, fruits, non processed meat and fish - be sure to take nutritious diet
Maintaining regular bowel movements at fixed time
Regular hours of sleep