"A "devoted husband" who said he killed his wife because he thought she was an intruder has been freed by a judge, who told him he bore no responsibility.
Brian Thomas, 59, admitted killing Christine, 57, in their camper van, but blamed his rare sleep disorder.
Jurors were told they could reach only not guilty, or not guilty by reason of insanity verdicts on a murder charge.
The Swansea Crown Court judge told the jury to declare Mr Thomas, of Neath, not guilty over the Ceredigion death.
The High Court judge, Mr Justice Davis, described Brian Thomas as a "decent man and devoted husband".
The judge said that from his understanding of his character from what had come out in court he may go away with a sense of guilt about what happened but he underlined a second time: "In the eyes of the law you bear no responsibility for what happened."
Mr Thomas's brother Raymond called him a loving husband and a family man and said: "Justice has prevailed".
Raymond Thomas, speaking on the court steps, said: "This is absolutely wonderful.
He went on: "Family and friends are truly delighted by the outcome today. They were a loving couple and always like that together.
"This was a tragic, tragic episode and we are all very emotional.
"It is like one psychiatrist has said, this was a perfect storm."
Mr Thomas said he was not surprised that the trial had gone ahead: "The circumstances were that it happened and it had to be sorted out."
But he said his brother was "a gentle man and has always been a gentle man," and he was "very emotional and thankful to be out".
He said the family thought it was wrong that his brother had been in custody for 10 months.
"Because bearing in mind what happened in the beginning and he was out and then to be suddenly remanded then was ridiculous."
The case, which followed Mrs Thomas's death in the coastal town of Aberporth, was described as "highly unusual" by prosecuting barrister Paul Thomas.
Jurors were told at the start of the trial that they could reach only two verdicts for the murder charge - not guilty, or not guilty by reason of insanity.
The court heard that tests commissioned by both the prosecution and the defence were carried out on Mr Thomas as he slept following his claims of a sleep disorder.
Both sleep experts agreed his behaviour was consistent with automatism, which meant at the time he killed his wife, his mind had no control over what his body was doing.
But the jury has been told there are two types of automatism: insane automatism and non-insane automatism, which they will have to decide between for their verdict.
In court on Friday morning, however, the prosecution told the jury that it was no longer seeking a special verdict of not guilty by reason of insanity and that there would be no purpose in sending Mr Thomas to a psychiatric hospital.
The court erupted into shouts of "yes" as family members jubilantly greeted the outcome.
'Not a risk'
The prosecution had previously described how Mr Thomas killed his wife, his childhood sweetheart to whom who he was married to for 40 years, because he had dreamt she was a man who had broken into their motor home.
The jury heard that Mr Thomas, who took medication for depression, had stopped taking his tablets as they made him impotent and he and his wife planned to be "intimate" while on holiday.
Expert evidence during the trial, however, suggested that he would have suffered worsening dreams and nightmares as a result of the withdrawal symptoms he would be experiencing.
The court heard that as part of their holiday, the couple, who had two daughters, stayed the night at a vehicle park in Aberporth in July 2008.
But, while there, a group of younger people turned up at the car park after they had gone to bed, and the screeching of brakes and tyres - described in court as "boy racer activity" - disturbed the couple, who moved from the site's lower to its higher car park.
The prosecution said that at 0349 the next morning, Mr Thomas made a 999 call, which was later played to the court, in which he said he had killed his wife because he had mistaken her for an intruder in a dream.
He said he had dreamt he was fighting one of the boy racers.
The court heard that the daughters said their father had been prone to episodes of sleepwalking, during which he had been known sometimes to act strangely.
During the trial a psychiatrist for the prosecution, Dr Caroline Jacob, said she did not think he posed a risk and should walk free."