Maybe you ate something bad? Have you been having monthly doctor visits? If so you could share your story with the nurse and take her recommendation. If no doctor visit yet, it's time to get started.
Well, it's always a judgement call for when to check in with your doctor. Mine allowed patients to call with various issues they worried about and they'd tell them that it's okay or that you should make an appointment. So, you could call the office if you are worried. But I also agree that you are probably fine. I would have bouts of stomach issues throughout pregnancy. And especially the farther along I got, heartburn on the daily. So bad I could hardly stand it to be honest. the stomach got squished. Which can happen. I would not think that this is a preterm labor issue exclusively. Now, I got diarrhea and looked at it as a 'clean out' before both of my babies were born. Think that is common that you go a bit more as you near labor. And as mentioned, had a lot of nausea and heartburn in my third trimester and in particular the last month. You have a long way to go still. And this was an 'episode'. So, just monitor it. If you get anything like severe back pain, then worry more or if you start to cramp. But I think you are probably fine and baby is safe and snug.
I wanted to check in and see how your pregnancy is going and how you are feeling! You are in the home stretch!!