First question? Are you adding cereal to bottle? Alot of parents are told by mom and grandma to do this to help baby sleep and it can backfire . (At such a young age they are supposed to wake up lots and not sleep too heavy...sleep too deep could cause SIDS) My nephew was given cereal at a young age a few weeks old, and he suffered lots of gastric distress...tummy ache and constipation. ("All my other kids did fine with it." was her statement.) It got worse when she started spoon feeding it at 3.5 mos (Then it was "He is almost 4 months old, he should be on all kinds of fruits and vegetables by now. Aggghhhhh!). I finally convinced mom that not all babies do well with this and it went away. (I am his daycare BTW)
Anywhoo...with my daughter my doc told me to give a tblsp of baby food pears. I was a little skeptical of this but it worked. You could also use pear juice (pears are very gentle). Prune is an option too. If baby won't take it straight try and sub and 1/4 to 1/3 of the pear or prune juice in place of water (if formula). Steer away from apple. Apple actually COULD make it worse if already constipated because apples are in high pectin. Kaopectate for diarhea was originally made from apple pectin.
Another option which is good anyway if formula fed is supplementing with cultures like acidophilous. Usually if anyone starts this kind of supplementation there is a lot of bad bacteria die off that can cause loose stools. Formula fed babies don't get good bacteria like breastfed babies. You can get baby acidophoulous at some healthfood stores. I would add a capsule of adult to one or two of my daughters bottles every day. They now sell formula with cultures in it. I think Good Start for sure.
Massage is good too. If this becomes a regular issue I'd talk to doc. There could be something underlying. I think its crazy that some people suggest that anyone can go 4-7 days without pooping. If you have ever gone that long you probably felt like garbage...at the least just not yourself. If I don't go once or twice a day I feel like garbage. It may be that baby can't break down all the milk protiens and they are binding baby???
One more note...diarhea or loose stools can be constipation. If hard stool gets lodged for long enough the new stool can manage to leak around the hard stool. So if baby is constipated and suddenly has loose stools keep this in mind. Whatever treatment you use that works and is gentle should be continued for a day or too after to make sure ya got it all.
Good luck!