A sleep-deprived, sex-starved Joaquin “El Chapo” Guzman is going batty in the slammer, according to a new report.

The drug lord, who has whined endlessly about his life behind bars in Mexico, is now suffering hallucinations and memory loss, his lawyers and a shrink who visited him said, according to the LA Times.

“He doesn’t know when is day and when is night,” said attorney José Refugio Rodríguez, who has filed several appeals to stop Guzman’s imminent extradition to the US. “He lives in constant anguish.”

The lawyer said Guzman sent him “a desperate message” that he was seeing things and “felt he was going to die,” the paper reported.

The Sinaloa drug kingpin’s wife, Emma Coronel, this week filed a complaint with the National Human Rights Commission that her hubby, who is being held in isolation, might die or “go crazy.”

She also said authorities have gone too far by cutting Guzman’s weekly lovemaking time with her from four hours to two.

Guzman — who escaped twice from high-security Mexican prisons – told the doctor that guards were inflicting “psychological torture” on him, according to a report released Wednesday.

He reported that lights in his cell were being kept on 24 hours a day and that guards wake him up every four hours to appear on camera for roll calls.

“They do not let me sleep,” he complained.

But authorities deny that his rights are being violated – suggesting that his bellyaching is merely a ruse to slow down his extradition.

National security head Renato Sales Heredia told a local radio station that Guzman has been visited by 35 relatives since he was transferred to the prison in Juarez.

“The truth is he has not been subjected to torture, of course, or any degrading or inhuman treatment,” Sales said.

Guzman escaped from prison in 2001 in a load of laundry and was recaptured in February 2014. In July 2015, he slipped out again through a tunnel in his cell at the Altiplano prison near Mexico City before being recaptured on Jan. 8.

He faces extradition to Brooklyn, where he is expected to be tried in federal court in connection with 12 murders.

In the doctor’s report, Guzman said the psychological conditions were worse than any physical violence, the LA Times reported.

“They have not beaten me, but I would prefer that,” he said.