Throwing his legs up in the air

Gi
My 6 week old baby will wake up in the middle of the night sometimes and he'll be throwing his legs up in the air like he's really frustrated and he would be whining. Does that mean he's gassy?