Targaryen madness

"Half the Targaryens went mad, didn't they?... What's the saying? 'Every time a Targaryen is born the gods flip a coin.'"

- Cersei Lannister

House Targaryen carries the trait for insanity in its bloodline. Over three hundred years of heavy inbreeding, marrying brother to sister whenever possible to "keep the bloodline pure," resulted in many of the medical problems seen with incest, particularly mental instability.

The most prominent example of the Targaryen madness was the last Targaryen king, Aerys II, who subsequently became known as "the Mad King". Aerys suffered from some sort of paranoid schizophrenia, hearing voices in his head that weren't real and told him to burn people alive because they were all plotting against him.

Other Targaryens displayed highly bizarre personalities, though they were not strictly speaking "insane". They didn't have hallucinations or hear voices, but some had aggressive, sociopathic personalities, such as Aerion Brightflame - older brother of Maester Aemon. Eventually, Aerion succumbed to the delusional belief that if he drank wildfire it would transform him into a dragon: he was wrong. The effects worsened with each generation of compounded inbreeding. By the later centuries of their rule, it was joked that when a new Targaryen was born the gods would flip a coin to decide if they would be a brilliant statesman or insane. This does not mean that all Targaryens were as a rule mentally unstable, as seen with how Daenerys Targaryen is considered to be mentally stable whereas her older brother Viserys is disturbed. Daenerys's oldest brother Rhaegar was considered a great man by all who knew him, and Maester Aemon became a wise and revered advisor to the Night's Watch for many decades.

Generally, if a Targaryen had multiple sons and one of them was clearly mentally unstable, they would try to skip over him in the line of succession in favor of a more stable younger son. Therefore, fewer of the early Targaryen kings had mental problems, because if a king did have a mentally unstable son he wouldn't be allowed to succeed his father. However, during the last century of their rule the Targaryen madness became increasingly common, making it more and more difficult to avoid having a mentally unstable son inherit the throne.

Although not a Targaryen himself, Joffrey Baratheon's incestuous bloodline is thought to have produced similarly severe defects in his sanity; he does not, in fact, have a drop of Baratheon blood in his veins. Joffrey's parents are actually twin brother and sister Jaime and Cersei Lannister. While he doesn't hear voices or see hallucinations, Joffrey is a sadistic, megalomaniacal sociopath.

Known Mad Targaryens

 * King Baelor the Blessed was overzealously obsessed with religion and purity, to the point that he starved himself into an early grave because he believed that food is of this world, and the material world is sinful.
 * Prince Rhaegel, older brother of King Maekar, had massive delusions and was known to randomly take off his clothes and dance naked through the halls of the Red Keep.
 * Prince Aerion Brightflame, son of King Maekar and nephew of the also-mad Prince Rhaegel. Aerion killed himself drinking wildfire, believing it would turn him into a dragon.
 * King Aerys the Mad, nephew of Aerion. The infamous Mad King. Had violent visual and auditory hallucinations, as well as a near permament feeling of persecution, which drove him to execute anyone who slighted him out of fear that they were conspiring against him. Tried to blow up King's Landing with wildfire, believing he would rise from the ashes as a dragon.
 * Viserys, the Beggar King, second son of Aerys II, had delusions of greatness and would have frequent, violent outbursts of jealous anger towards his sister, Daenerys.

Daenerys Targaryen?
Daenerys Stormborn is not thought to be insane, though her merciless treatment of slave masters in Meereen is a dangerous hint that she may not have escaped from the Targaryen madness. Even so, her actions were ultimately against a group who were mistreating others (seeing this as an echo of how she was mistreated), and she thought she was helping to secure freedom for the slaves of the region. However, Barristan Selmy notes that the Mad King also genuinely believed his actions were just, even though others knew he was a madman, which compels Daenerys to become more merciful. When the slave masters besiege the city, Daenerys shows her ruthless streak again when she announces her plans to "burn their cities to the ground". Tyrion Lannister compels her to take a more diplomatic approach, in order to prevent her becoming like her father. He dissuades her by telling her of the Mad King's plans to incinerate King's Landing with wildfire.

Quotes
"The 'dragon spawn' were famous for losing their minds. It was the price they paid for centuries of keeping the bloodlines pure, and Aerys more than happily continued the noble sister-fucking tradition of his forefathers."

- Robert Baratheon on the Targaryens.

"Babies or no, theirs was the same cursed blood that flowed within the Mad King's veins. They were 'dragon-spawn', and couldn't be allowed to survive. What would they grow to be, loyal subjects?...Was it a crime to put an end to a family of lunatics born of incest?"

- Robert Baratheon on the deaths of the Targaryen children.

In the books
On a few occasions, Targaryens were born who had benign but nonetheless delusional personalities, such as Baelor "the Blessed". Baelor was admittedly a well-intentioned man but lost his grip on reality, becoming obsessed with religion - not in a puritanical way but by carrying altruism and pacifism to an absurd degree. An overzealous fool, he prayed more than he ruled, wore only a crown of flowers, and died without heirs because he never consummated his marriage for fear of sinning. He even locked his three sisters away in a tower (mockingly called the "Maidenvault") to avoid carnal temptations. He made a stonemason the new High Septon due to the beauty of the religious statues he carved - despite the fact that he was illiterate and knew no prayers - believing him the Smith in human form. After the stonemason died, Baelor replaced him by appointing an eight year old boy as High Septon.

There are also examples of Targaryen children who were born mentally disabled, but because they were never seriously considered in the line of succession, little was recorded about them and they are given only scant mentions in the royal histories. The daughter of Aerion and Aemon's oldest brother is recorded as being born "feeble-witted".

The generations of inbreeding practiced by the Targaryens usually resulted in mental health problems, though at times they also produced severe detriments to physical health. Some Targaryens were intellectually and emotionally normal, but possessed such fragile health that they suffered from numerous ailments and died young. A prominent example of this was King Jaehaerys II, a good and honorable ruler who possessed frail health and died after ruling for only three years (however, Jaehaerys II has been officially cut from the TV series continuity).

Aegon II Targaryen's children also had several health problems as a result of their incestuous bloodlines, their mother being Aegon II's own sister Helaena. Aegon II's son Jaehaerys was born with six fingers on his left hand, and six toes on each foot, but otherwise was a completely healthy, mentally stable, and happy young boy. Jaehaerys's twin sister Jaehaera, however, is described as possibly having some form of Autism spectrum mental condition. Jaehaera did not smile or cry as a baby, or any of the normal reactions a baby has, and at the age of six was called "sweet and simple". Even so, due to the death of the rest of her immediate family, Jaehaera eventually became queen when she was wed to her cousin Aegon III Targaryen, to end the civil war known as the Dance of the Dragons. Jaehaera never gave Aegon III any children, however, and after her death Aegon III later remarried to a lady of House Velaryon who gave him five children.

The heavy Targaryen inbreeding also caused severe health problems in the Mad King's own progeny with his sister-wife Queen Rhaella: Rhaegar, Viserys, and Daenerys actually weren't their only children, just the only ones to survive infancy. Rhaegar was born in 259 AL and Viserys was born in 276 AL - in the intervening 17 years, Queen Rhaella had no less than two stillbirths, three miscarriages, and three infant sons who were born alive but were so sickly that none of them lived more than a year. It was speculated that the stress from all of these dead children is one of the factors that accelerated Aerys II's spiral into insanity (not the root cause, but it certainly didn't help).

The "Targaryen Madness" wasn't always initially present, and sometimes grew worse with age. Aerys II himself, while remembered as "the Mad King", was perfectly sane even as a young adult. As the years passed, however, he had lapses into unstable behavior which gradually grew worse and worse, and longer in duration. Many were willing to ignore these eccentric episodes when they passed, but by his mid-40's Aerys had become completely unstable, hearing voices that weren't there, becoming irrationally paranoid, and burning men alive for his own amusement. At first, Daenerys wasn't willing to believe the tales of her father's madness as anything more than rumors spread by Robert Baratheon, but after Ser Barristan Selmy joins her service, at her request he gives her a frank report on the nature of Targaryen madness.

Daenerys becomes deeply concerned when she learns that Targaryen madness was often a late-onset condition: her own infamously insane father showed little sign of mental instability into his late-20's, thus there is no real guarantee that the apparently-sane teenaged Daenerys will not suddenly turn violently insane at some point in the future; either one year in the future or twenty years in the future.

House Baratheon in the current generation is closely related to the Targaryens, as Robert Baratheon's paternal grandmother was a Targaryen, thus making Robert's father the first cousin of King Aerys II. Every now and again when certain people disparage the three Baratheon brothers, they sometimes speculate that their "drop of dragon-blood" from their partial Targaryen descent made them a little odd. For example, Olenna Tyrell thought this was a contributing factor in what made Renly Baratheon so rash that he thought he could proclaim himself king even though Robert had two sons and a middle brother Stannis before Renly in the line of succession.

Ironically, if Joffrey Baratheon was the actual son of Robert Baratheon, he would have had some Targaryen blood in him - and this may have been used to explain his erratic behavior. Secretly, however, Joffrey is actually the product of incest between twins Jaime and Cersei Lannister, and has no relationship to the Targaryens.