Gas pain when laying down?

Caitlin

I’ve been trying not to eat late because ive been having some stomach issues if I do. Lately I will go to lay down in bed and my stomach starts to hurt and sometimes I have to run to the bathroom because of it. Sorry - TMI. Why is this happening when I lay down!?