Abdominal pain, vomiting

Br

I’m currently 18 weeks pregnant. Tonight makes my 4th episode of severe upper abdominal pain over the past 9 weeks. 3 of the 4 times I’ve vomited. All times were at night a hour to a few hours after I ate. Food choices were all different so maybe it’s eating later & laying down? I’m not sure. The first time was the worst (I was currently 9 weeks) & I went to the ER. They said it could be gastritis. Sent me home after pain was controlled and felt better. OB is aware. Just wondering if anyone has had similar??