Playing Crusader Kings and am thinking of adding a mod that let's regents take control one problem is that it seems if the player or AI is not careful during said regency the Realm will disintegrate after a couple years into various independent Dukes, Counts and petty kings. Did this happen in history or would this be rare?
As a rule, they tend to go badly, and as you suggested, are prone to usurpation. Two notable examples from the period are Edward 'the Martyr', king of England from 975-978, and the Holy Roman Emperor Otto III (980-1002), who was a child king for most of his short life.
Edward's tragic tale really kicks off with the premature death of his father Edgar in 975 when Edward is just 13. Edgar had been a powerful king and a great reformer, who had maintained an exceptionally effective defence of England and overseen a period of peace and prosperity, but who had died without naming an heir. As an older son, Edgar was favoured by the Church, and was duly crowned in 975, but their was great factionalism in both the Church and among the nobility as to who should have been the heir. Edward's brief reign is notable for its political upheaval, what the Anglo-Saxon Chronicle calls "manifold disturbances":
Almost immediately into Edward's reign, the well-regarded and powerful Ealdorman of Northumbria, Oslac, was sent into exile. This is a marked departure from his father's rather non-interventionalist policy with regards to Northumbria. Across England, nobles take the opportunity to make grabs for power, and several new Ealdormen appear in Wessex. In general, there is an attack on monasticism: the "secular clergy" largely abolished under Edgar's reforms return and oust many monastic figures from positions of power, and several Ealdormen essentially extort land granted by Edgar back from monasteries, particularly Ælfhere of Mercia. Ælfhere almost comes to open warfare with one of his major rivals, the Ealdorman Æthelwine of East Anglia, as both make attempts at land-grabs from monasteries in Cambridgeshire. The vast majority of these upheavals played out the factionalism between supporters of Edgar and his half-brother Æthelred.
Unfortunately for Edward, his widowed step-mother Ælfthryth was the chief supporter for her own son, Æthelred's, claim to the throne. At a meeting with Ælfthryth and Æthelred at Corfe on the 18th of March 978, Edward was murdered, leaving Ælfthryth to claim the throne for Æthelred. Debate has raged for literally centuries as to whether Ælfthryth actually ordered the murder or - as Henry of Huntington later alleges - even does the deed personally, but it certainly appears to have been considered the case at the time. In a famous sermon, the archbishop Wulfstan of York claimed:
Edward was betrayed, and then killed, and after that burned.
Æthelred himself is only 12 when he takes the throne, leading to Ælfthryth the acting as his regent until 984. The early years of Æthelred's reign are marked by a sudden and brutal resumption of Scandinavian raiding of England which had essentially disappeared under his father. In the late 970s, Southampton, London and Cheshire are all ravaged by Scandinavian fleets, likely hoping to take advantage of the parlous political situation to make the best of a lull in the English defences.
In the Holy Roman Empire, Otto III is an infant only 2 or 3 years old when his father Otto II dies and he becomes King of Germany. Despite the best efforts of his mother, Theophanu, and other female relatives, his power is almost immediately usurped by his uncle, Henry II of Bavaria. According to the Annales Quedlinburgensis:
"Henry, formerly a duke, returned from exile... he took custody of the king by right of kinship. Initially he pretended that he would faithfully protect the infant king's interests, but then, stimulated by the goad of increasing greed... he tyrannically seized the throne"
The bishop Thietmar of Merseburg, in his Chronicon, is even harsher on Henry, claiming that he demanded kingship the moment that the infant Otto was in his custody. Interestingly, the German nobility refused to follow Henry, forcing him to return Otto to his mother Theophanu, who then ruled as regent largely without insurrection until her death in 991.