Hi welcome to Health care magic forum.
Thanks for choosing H.C.M.Forum.
At the gestation of 38 weeks, there will be little space in the abdominal cavity as the womb, occupies the major space in the upper abdominal cavity, it especially true in case of short statured people, and the stomach can't move freely, and there could be abnormal movements of stomach.
Other wise the gastric irritation could be the cause of the pain due to irritant food or ulcer, or indigestion
due to hard food.
Or it may be due to power full contractions of the uterus
I advise you to consult a surgeon for diagnosis and treatment.
Wishing for a quick recovery.