I have to lay down on my sides slightly turned to stomach, it's the only way I can get rid of it. I hey it even if I don't eat anything gassy, pregnancy just does it to me.
Drink lots of water. Also try going on your hands and knees and arching you back, butt up. Cutting out diary and adding fiber and corn to your diet really helps too.
Try laying on your left side with your knees up and a pillow between them. Other than that stop eating the food that's causing the gas.