Oh dear! I remember those pains! But like others have said, walking seriously helps. I used to walk at night, 1 coz I was suffering head aches too and there was no light at night, and 2 because its so much cooler at night!
Just get up and get moving and the gas will pass! Quite literally! Haha!
Good luck!