Oh that sounds so scary! I'm sorry you're going through that, kayla. I hope you find some relief soon
Sometimes it's not food that triggers it. I know it's like that for me-there have been days I pigged out on junk, and I slept okay, and days I ate everything right and couldn't get to sleep until 6 in the morning. So frustrating! So it's possible that it's not closely related to what you eat.
It sounds really painful, what's happening to you, so I would visit the doctor.