I've heard this story (fable?) many times over the years: during a particularly bloody intrafamily struggle for the throne in England or Western Europe, one claimant faked being either mentally retarded or insane so as to avoid looking like a potential threat. After the mayhem subsided, he eventually revealed to the public that he was not, in fact, mentally ill. Any idea when/where/if this actually occurred?
This is suspiciously close to the plot of I, Claudius, a historical novel by Robert Graves based on the life of the emperor Claudius.
What we actually know, as opposed to what's interpolated by Graves, is that Claudius had a limp and a stutter, which helped some of his family dismiss him as an idiot; however, he ultimately proved otherwise. He also wrote a controversial history of Octavian's rise to power, which probably didn't impress anyone as to his judgement, and he was passed over for appointment to offices by several emperors before Caligula decided to use him. He put up with rather a lot from Caligula, until Caligula was assassinated and a group of Praetorians declared him emperor.
Graves decided for the purposes of storytelling to have his Claudius purposefully cultivate his reputation for idiocy when he realized it could serve as protection, which is how he was the one left standing to become emperor.
Can I give you an outside the box answer? Mpande kaSenzangakhona of the Zulu was brother to King Shaka and King Dingane before he too became king. He survived several rounds of fratricidal purges because he was viewed as the family idiot, no threat or ability or ambition. The Royal Family even took his eldest son away and gave him to an heirless northern chieftain to raise, because who would imagine Mpande's boy might one day be king? Of course, when Dingane ran afoul of the Boers, Mpande seized his chance and ran to Natal to launch a coup with foreign firepower in support. He prospered as king --living mostly at peace where Shaka and Dingane were mostly at war-- and he was the only Zulu monarch of the 19th Century to die a natural death.
Sources: Rise and Fall of the Zulu Kingdom by John Laband or anything by Ian Knight that goes into the Zulu State before Cetshwayo's rule.
Is it possible you're confusing the story with one about Ancient Rome?
According to Livy's Ad Urbe Condita, Brutus (a possible ancestor of Caesar's assassin) acted as if he was slow-witted to avoid the distrust of Rome's king Tarquinius. However, he eventually overthrew the king, helped establish the republic, and was elected consul.
Livy wrote his book almost 500 years after those events, so it's doubtful how accurate the story is. It's more of a legend of how the republic of Rome was founded.
Maybe not what you were looking for, but it's the only thing that comes to mind.
I'm certain this has happened a lot. In China, Zhu Di feigned mental illness to avoid being purged by his nephew long enough to get into a position to take power himself.