Excruciating stomach pain last night

So I don’t know if it’s something I ate or what, but last night was horrible. I had such awful stomach pain. I am pretty sure it was all gas & pressure but the pain was so intense it kept me up for like 2 hours. Like all the pressure was right underneath my ribs. Once again I’m pretty sure it was gas. Anyone deal with this?