Babies develop consistent sleeping habits gradually. Newborn babies sleep often, but not for long stretches at a time. They need to eat and sleep on demand. Therefore, it is best to respond as quickly as possible to your baby's sleep and eating needs. So the easiest way to do this is to keep them near you.
Usually, a baby will follow a pattern similar to eat, poop and sleep. Observe your baby when for he or she is at one of these stages, and what step usually follows. If it helps, chart the steps and look for patterns. It took me one week to get my baby's routine.
Encourage your baby to sleep alone, but of cos remain nearby. Newborn baby will sleep better when swaddled in a baby blanket or held close to a parent's body. The warmth and feeling of being held is familiar and comfortable to the baby. Therefore, baby will sleeps easier in either way.
Newborn babies often wake up during the night to eat. In order to encourage your baby to sleep more, have your baby in a darkened room in the evening, and avoid stimulation as much as possible. When your baby is awake, quietly tend to his needs then lay him back down for sleeping.
It is important for your baby to sleep alone, and the best to being is at about three months of age. The longer you wait, the harder it will be for your baby to develop this habit. It may be necessary for you to comfort your baby with singing, patting, or a little cuddle and then return to his/her bed many times for the one to two weeks. I struggled for one week plus till my little princess got used to it. At times it can be quite frustrating too. Keep trying cos gradually your baby will learn how to sleep alone during the night and when baby's sleep, parent's will get their sleep easier.