Often, it seems fairly random whether or not babies sleep well. New parents will often discuss how they were simply "lucky" with one child as opposed to another. While it is true that in many cases how your child sleeps is largely out of your control, there are many baby sleep tips you can employ to encourage better sleeping habits. One of the most important is to ensure that your baby is comfortable when he goes to sleep.
Bedtime is a transitional period for your child, and your efforts to make him sleep better should revolve around getting him to learn to sleep on his own. One of the most important elements of achieving this is to create an environment where your baby is as comfortable as possible. For this reason, the before-bed routine should always consist of changing and feedings - the worst thing for a baby, in terms of sleeping well, is to be in want of something when he is put to bed.
You should also be trying to make your baby as physically comfortable as possible when putting him to sleep. One of the most commonly overlooked aspects of this is allowing your baby to breathe easily through the nose. Most people, but especially babies, depend on clear nasal passages for a good night's sleep. It's important to remove all airborne allergens in the baby's nursery: everything should be well dusted, and you should keep dust collecting items - like fuzzy blankets and stuffed animals - to a minimum. If the nursery has a heating vent, you might want to install a simple, inexpensive filter (available at most hardware stores) in it. If you do so, make sure you change the filter regularly.
When your baby is very young it takes time for him to learn to breathe through his mouth, so you must carefully pay attention to his nasal breathing when putting him to sleep. If you notice a problem with that, and it is persistent, you may benefit from installing an air filter in the room that is designed to remove dust particles and allergens - in some cases this also has the added bonus of creating a soothing hum that will help many babies sleep better.
You should also pay particular attention to your baby's clothing. All babies are different in terms of their preferences, and you have to watch them closely. In many cases, things that look comfortable to you - very snug outfits, for example - may not be comfortable for your particular baby. Try both tight and loose fitting clothes and see which ones your baby seems to prefer.
Finally, consider how well your baby sleeps with wet diapers. Most babies will sleep well through the night with a wet diaper, but some will not. If this is the case, you can often solve your baby's sleeping difficulties by giving him a change in the night.
The main thing to keep in mind in terms of your baby's comfort is to pay close attention, and to trust your instincts. Although it is tempting to follow guides and stick to hard and fast rules, remember that the adage "mother knows best" is generally true. So if your baby seems uncomfortable in his clothes, don't hesitate to change him into something that doesn't "look" as comfortable. If you trust your own judgments over those of guides in terms of your baby's comfort, it's likely that he will sleep much better.