Maybe its round ligament pain? I'm going through it right now and I'm over 37 weeks. I assume cuz my baby is dropping more?!
I had that problem with my first, for me it was some gastric thing. It could be the same for you, or it could be a gallbladder, or even heartburn problem depending on what you are eating. Call your doctor and let him or her know about it and they can help you out. I will say with mine I was put on a very strict diet for a long time because it was so bad, but anything for the baby right? Otherwise, pay attention to what you eat. Go low on the grease, spicy foods, and caffeine and maybe it'll calm down for you!