How can i deal with trapped gas pain!

hi everyone. i’m currently sitting in increasingly bad pain due to trapped gas and a flare up. what is the best way i can deal with this so i dont have anymore sleepless nights of pain