The woman screamed, kicked out and Mr Lee fell out of bed and fled, still naked, down the stairs.
Mold Crown Court heard allegations that Lee dressed and came back upstairs but she shouted at him and he left her home – only to be arrested by police in the garden next door, having left his socks behind in her living room.
Mr Lee, 49, of High Street, Llanidloes, claimed that he was so drunk that he simply went into the wrong house.
He said he believed that he was at home with his wife and had no memory of going to the woman's house, stripping off and getting into bed.
Mr Lee denied trespass with intent to commit a sexual offence and a second charge of sexual assault.
He was cleared of sexual assault at the direction of Judge Keith Thomas after the woman said that he had not touched her sexually and he was cleared of the trespass offence by the jury of six men and six women after a short retirement.
Judge Thomas said that while no-one would condone the defendant for his actions the law required that specific offences had been committed for someone to be convicted.
Prosecuting barrister Anna Pope said the woman had left her back door open one night in May because her dog was ill.
She went to bed after midnight, fell asleep "but woke up to find someone in bed with her. He was not wearing any clothes," she said.
The prosecutor said the woman was shocked, screamed, kicked out and the man fell out of bed.
While he was drunk it was the prosecution case that he knew what he was doing, said Miss Pope. The woman had banned him from her home previously because it was alleged that he started making sexual advances towards her which were not welcome.
It was alleged that he would expose himself to her regularly and try and kiss her.
Defending barrister Oliver King said that if his client intended to sexually assault her he had plenty of opportunity but had not done so.
Mr Lee said that he had believed he had gone home to bed with his wife.
He said that he did not believe he would have stripped off downstairs because it was not something he would do. When he realised where he was he was embarrassed, leapt out of bed, apologised, got dressed and left, he said.