4 month old, change in poop habits

La

So my 4 month old used to poop pretty frequently and normal. Since last week, my baby’s pooping habits have changed and I think it might be something I ate last weekend but not sure! He started having loud intestinal sounds, and I understand they could be from just digesting but that would never happen before. He rarely poops during the day now! And he’s been having trouble staying asleep at night, he’ll wake up crying and not because he’s hungry! he seems like he’s having some sort of pain. I know it can’t be from the 4 month sleep regression. Once he’s fully awake at around 6 am he poops A LOT and it’s usually very watery. This is the only time he poops now. :/

But it’s weird as he only shows signs of discomfort at night then he’ll release in the morning. Anyone have any idea what I could do? He’s exclusively breastfed