There are a few examples from history that are at least close to what you are saying:
John Bailliol abdicated the throne of Scotland to be eventually replaced with the Stewart dynasty, yet Edward Baillliol was able to succeed to the throne with English support. (though he was already born at the time of the first Bailliol's abdication)
A better example was Phillip V of Spain, who abdicated in favour of his son Louis, and then only Louis' death reigned again, and then after he died was succeeded by his OTHER son, Ferdinand. Though again, both sons were born prior to abdication.
You probably won't find an example of the exact thing you are asking as abdications tended to occur either shortly before death (natural or otherwise) or at least towards the latter part of a monarch's life when they already had plenty of heirs.