Graeme Morris, 38, assaulted Anne, 63, and Fred, 64, at their house in Troon on 5 October last year after mistakenly believing they harmed him as a child.
Mrs Morris died because of a serious heart condition she suffered from.
Morris admitted culpable homicide and assault. He will only be released with the approval of Scottish ministers.
Morris' detention was ordered by judge Lord Uist at the High Court in Edinburgh.
The court heard he had been diagnosed as suffering from paranoid schizophrenia and would pose a danger to the public if not treated in conditions of high security.
At an earlier hearing, Lord Uist was told that Morris, a former student at Glasgow School of Art, was obsessed with the idea that he was a genius.
He was described as "strange and eccentric" said advocate depute Andrew Miller, prosecuting.
He also came to believe that, somehow, he had suffered as a child at his parents' hands.
Former girlfriend Emma Russell had been worried about his increasingly strange behaviour during the months leading up to the attack.
She contacted a doctor and Morris was put on a waiting list to see a psychiatrist.
On 5 October last year, Morris travelled from Brighton to Troon and turned up at his parents' bungalow without warning.
The couple were sitting in their conservatory when Morris began to shout abuse.
He grabbed his mother, who was on a couch, by the hair before punching his father to the floor.
As Mrs Morris tried to struggle to her feet, her son slapped her face.
Morris then continued battering his father as he lay on the ground, stripping him to his socks and kicking him.
When Mr Morris Snr arrived at a neighbours' house pleading for help they did not recognise him because his head was covered in blood.
Morris fled just before police arrived and took a train to Glasgow. The officers found his mother slumped on a sofa and apparently not breathing.
Morris was detained as he got off a train later that day at London's Euston Station, then brought back to Scotland for questioning.
He confessed to hitting his parents but added: "I didn't murder my mother. I didn't have any intention of murdering either of my parents or killing them or for them to die."
The court was told Mrs Morris died because of a heart condition, diagnosed in 1996 and known to her family.
Mr Miller said: "The effect of this condition was that any strenuous physical activity or stressful situations had the potential to be life-threatening."
Mr Morris spent seven days in hospital following the attack, receiving treatment for injuries including a fractured eye socket.
A man who killed his mother and battered his father at their Ayrshire home is to be detained indefinitely at the State Hospital at Carstairs.