A Connecticut man is behind bars after he had sex with his dead girlfriend — in the hope it would wake her up, according to reports.

Aaron Graser, 39, was sentenced to a year in prison for fourth-degree sexual assault of a corpse on Tuesday, the Hartford Courant reported.

Cops found Graser’s girlfriend dead in their apartment and surrounded by needles back in January, the paper reported.

Graser told police that he found her unresponsive with heroin and drug paraphernalia in her lap — and decided sex would be the best way to rouse her because she didn’t like sleeping with him.

“Aaron stated he listened to see if the victim was breathing and he heard gurgling. Aaron stated he knew the victim hated having sex with him so he figured that the victim might wake up if he had sex with her,” a warrant for Graser’s arrest read.

He also admitted tying her ankles and wrists to the bedposts because it was one of his kinks.

When the attempted coital revival failed, he put her pants on and called his neighbor, who used to be a paramedic. The neighbor later told police he believed the woman had been dead for hours.

An autopsy later determined the paramedic was correct — the ligatures caused by the bedpost ties didn’t have bruises, which means no blood was flowing at the time, a medical examiner testified at the trial.

The ME also testified that the gurgling Graser heard could have been decomposition gases escaping the woman’s body.

A toxicology report determined the woman had high levels of fentanyl, heroin and another synthetic drug in her body and she died from a drug overdose.

Graser originally was charged with second-degree assault, but agreed to plead guilty to the lesser charge.

He was spared from being placed on the sex offender registry — the judge determined it wasn’t necessary for public safety “based upon the facts” of the case.