I don't think we as parents achieve it, our babies do it on their own - when they are ready. My DD went into her cot at 10 weeks and the first night in the cot was also her first night in a sleeping bag - so her first night of not being swaddled. She slept beautifully, 10 hours straight. She slept through the night (10-12 hours straight) from 10 weeks until 6 months when we moved house AND she cut her first two teeth. Then she started crawling and standing and her sleep has been up and down since. We didn't change anything yet her sleep patterns changed - I therefore believe the same thing can happen in the reverse ie not so good sleepers suddenly become good sleepers. I honestly think it just happens.

We use to rock DD to sleep for EVERY sleep. I wore her in the sling for most of her day sleeps until she was 6 months old. Suddenly one day, she went down for a day sleep in her cot and just went to sleep - for 2 hours! I was gob smacked, it was so out of character. We haven't looked back since. Sometimes she'll kick up a stink but most times she just goes to sleep. Sometimes it's for an hour or two, sometimes 30-40 mins. Sometimes she'll grizzle for a few minutes (protesting), sometimes she'll just turn her head to the side and nod off. She is an individual like the rest of us - there is no formula for her, she just does what she feels like on the day at that time.

Sorry, not sure if that helped much but I really am a big believer in letting babies fall into their own ways. You can guide them a bit but I honestly think they work it out on their own most of the time. My best advice is keeping trying things as what worked last week may not work today but what didn't work yesterday, may be the answer tomorrow.