The exact reason for pyloric stenosis isn’t clear. But it seems to happen because the muscle at the bottom of the stomach gets too big. This blocks food from moving into the intestine. It is more common in boys and can run in families.Things that might up the risk are if the mother smoked while pregnant or the baby took certain antibiotics. These factors can’t cause the condition on their own but may lead to a higher chance of getting it.