Three to four months. Babies are capable of one period of deep sleep (3-4hrs) per 24 hours starting at birth and generally drift in and out of lighter sleep states for the rest of their day. By 3mo their brain waves include mature sleep patterns and longer sleep is expected. Babies can learn to self settle soon after birth and return to sleep after they wake, though a brief feeding may be needed.Good routeins help.
Six months. I tell parents not to expect their babies to sleep through the night until 6 months of age. Of course some parent s are lucky. Usually by 6 months the babies are big enough to go through the night without depleting their reserves and they have started solids.