The federal judge who oversaw Jeffrey Epstein's child sex trafficking case says "it is unthinkable" that any jail inmate — let alone one with such a high profile as Epstein — would die in custody, as the wealthy investor did this summer.

Judge Richard Berman also is calling for reforms to be carried out in the U.S. prison system in light of Epstein's death in a Manhattan federal jail, which authorities have ruled was a suicide by hanging.

Berman, in a letter to The New York Times, said the indictment last week of two guards there for allegedly covering up their failure to check on Epstein in his cell in the hours before he died Aug. 10 "is not the full accounting to which Mr. Epstein's family, his alleged victims and the public are entitled."

"It would be a tragic and costly missed opportunity for the Bureau of Prisons and the United States attorney general [William Barr] to fail to undertake — and to make public — an in-depth evaluation of prison conditions (not only at the M.C.C.) and to carry out appropriate reforms," wrote Berman, who serves in U.S. District Court in Manhattan.

"We all agree that it is unthinkable that any detainee, let alone a high-profile detainee like Mr. Epstein, would die unnoticed at the Metropolitan Correctional Center," Berman wrote in his letter to the Times. "It is the job of the Bureau of Prisons to ensure the safety and security of federal inmates."

Berman added, "There is at the very least anecdotal evidence that chronic understaffing, subpar living conditions, violence, gang activity, racial tension and the prevalence of drugs and contraband are the norms in many of our prisons."

"These conditions are worsened by the absence of necessary services, including meaningful mental health and drug rehabilitation, not to mention adequate heat and hot water," he wrote.

Berman's office said the judge was unavailable to talk to CNBC on Tuesday about his letter.

A spokeswoman for the U.S. Justice Department, which is headed by Barr, did not immediately respond to a request for comment.

A Bureau of Prisons spokeswoman declined to comment, but pointed to testimony that BOP Director Kathleen Hawk Sawyer gave last week to the Senate Judiciary Committee, which detailed the agency's efforts to address problems in the prison system.

Epstein, 66, was arrested in July on charges of trafficking dozens of underage girls from 2002 through 2005 so that he could sexually abuse them at his residences in Manhattan and Palm Beach, Florida.

The case made international headlines due to Epstein's past friendships with Presidents Donald Trump and Bill Clinton and Britain's Prince Andrew, Epstein's vast wealth and a previous sex crime case involving a minor girl in Florida, where he served just 13 months in jail beginning in 2008.