Help! Horrible gas

Erin • Pregnant with #2 :)
My daughter consistently wakes up in the middle of the night screaming in pain with terrible gas (3:30am as I write this!). She is in general a very gassy/colicky baby but it is especially bad every night starting around 1-2am and you can here the loud and painful sounding gas moving in her stomach before she eventually gets it out (after LONG periods of helping her get it out). I've eliminated dairy, alcohol, caffeine from my diet long ago. So I'm wondering if it could be due to me nursing her while lying down in bed before we go to sleep at night. She likes to nurse to fall asleep so I lay flat with her and nurse her. Could she be swallowing too much air in this position that it later wakes her up? Or maybe it could be due to her tending to have colic/crying episodes in the evening where she's swallowing a lot of air?