With the oldest, he did it on his own from about 6 weeks through 3-4 months, and then started waking up again. It continued to get worse until he was waking up every single hour, and we finally had to go hardcore on him at 9 months, being in the room to reassure him, but letting him cry. It still took another 6 weeks after that before he would really sleep through the night again.
With the younger one, it suddenly happened on its own as soon as she moved into her own room at 6 months. Apparently her Daddy's snoring was not helping matters one bit.