Constipation in newborns is common, particularly when transitioning from breast to bottle and can usually be resolved by simple home remedies. If however the problem is not resolved consult your pediatrician.
Firstly confirm that the baby is in fact constipated. Infrequent stools are not necessarily a sign of constipation, particularly in breast fed babies.
If the baby seems to be straining while passing stool, or if it is painful, hard and dry then these are the signs of constipation that requires attention.
It is important to remember that breast fed babies are far less likely to be constipated, even if they pass stool infrequently such as once in several days.
Adjusting the proportion of water in the baby’s formula can work well since it can increase the baby’s water intake and soften stools.
Massaging baby’s stomach can help relax baby and there is also some evidence to suggest that this could help the passage of food through the digestive tract helping the baby pass stools.
Stretching baby’s legs and exercising them by pushing the knees back towards the stomach is also thought to activate the digestive tract.
If the problem persists, consult a doctor and remember never to administer any medication without consultation.