Babies are not born with an established circadian rhythm (from the Latin word "circa" meaning around and "diem" meaning day), which means that they are unable to distinguish day from night.
Developing their own circadian rhythms does take several months as their brain is not yet able to make their own melatonin, the sleep inducing hormone.
Night time breastmilk is rich in melatonin, which helps the baby develop their own circadian rhythm and learn to sleep longer stretches during the night.
An study conducted in Israel in 2012, concluded that exclusive breastfeeding is associated with reduced irritability/colic and a tendency toward longer nocturnal sleep. Nocturnal breastmilk consists of substantial melatonin levels, whereas artificial baby formulas do not. We speculate that melatonin which is supplied to the infant via breastmilk plays a role in improving sleep and reducing colic in breast-fed infants compared to artificial baby formulas.