On average, babies sleep in a crib until between the ages of 18 months and three years; when baby is strong or active enough to climb out of a crib many families switch them to a lower toddler bed or a big-kid bed with safety rails.