My baby is almost 3 months old and he does that when he has reflux.
He had reflux really bad betwen 1 and 2 months, then the dr put him on an acid reducer and he's been much better with it.
Does your baby kind of lift his head up or back when he does it?
If so, look up symptoms of acid reflux in newborns and babies and you'll see the symptoms and what to do.
He might be having it when he sleeps or lays down.
I could be wrong though but just thought I'd let you know how my baby does which sounds similar and the dr diagnosed it as acid reflux.
Take care