You can try to freeze the milk and let it gnaw, it will help relieve gum pain.
Could be acid reflux or gas? Usually when my 3 month old kicks and throws himself back, that’s what it is. I burp and hold him up for a bit before lying him back down and I give him probiotic daily.
In the past my baby did this due to upset tummy when I had dairy. Have you tried limiting that if you breastfeed? Or probiotic drops?