Richard Thomas, 27, collapsed when police informed him about his victim’s medical status and is still waiting to hear if he has contracted the virus.
Thomas knew the woman and was aware that she has another illness but had not known about the HIV.
He was shocked when he was told and asked to be taken to hospital, Liverpool Crown Court heard.
He had let himself into her home in Leigh, Greater Manchester, uninvited in the middle of the night and she awoke to find him raping her from behind.
“She froze and no words were exchanged. He pulled up his shorts and left,” said Harry Pepper, prosecuting.
“He was arrested and interviewed and said he had been drinking heavily, taken cocaine and ecstasy and could not recall the incident,” he added.
His barrister, Virginia Hayton, said that he still cannot recall the attack but when told about it he said that the woman “would not lie, she tells the truth. If she says I have done it, I have done it.”
Jailing Thomas for five years and four months, Judge Mark Brown said he had committed “this dreadful offense” while she lay asleep, having taken a sleeping tablet, and left her distressed and anxious.
He ordered him to sign the Sex Offenders Register for life.
Thomas, of Sandringham Drive, Leigh, pleaded guilty to raping the woman on July 20 this year.
Miss Hayton said that Thomas, who has previous convictions but none for sexual offenses, “is remorseful and cannot understand why he did it and it is troubling him.”
She said that he will not find out the result of his HIV test until Friday and has had the worry of the outcome hanging over him.
“It is his own fault, if he had not committed this offense he would not have placed himself in this position.”
She said that he started using cannabis at the age of nine and was drinking heavily at the age of 11. He became addicted to ecstasy and cocaine at 13 and was put in care the following year.
He has been trying to contact his family but they want nothing to do with him, she said, and he will now be away from his partner and their young daughter, as well as his two other older daughters from previous relationships.