Rex Heuermann has been under close and constant watch in a Long Island jail since he was charged in July with killing a succession of women and leaving them wrapped in burlap along an oceanfront road.

Now the investigation into the Gilgo Beach serial killer has followed him behind bars.

Investigators at the Suffolk County jail in Riverhead, N.Y., who belong to a sex-trafficking unit have been interviewing female inmates who have worked as escorts to gain more information about Mr. Heuermann, a 59-year-old architect who has pleaded not guilty and is being held without bail under the same roof.

Earlier investigations of the murders were plagued with dysfunction, and investigators ignored leads proffered by women working as escorts and prostitutes. Now, the authorities finally seem to be listening.

The three women whom Mr. Heuermann is charged with killing more than a decade ago all had worked as escorts. He is also the prime suspect in the death of a fourth woman found at Gilgo Beach and is being investigated in connection to seven others found buried nearby. Numerous prosecutors are looking into other possible links between Mr. Heuermann, who Suffolk authorities say was using massage parlors and escort services until his arrest on July 13, and other killings.

Jail officials say they have interviewed about 120 women between the Riverhead jail and the county’s other lockup, in Yaphank. They have forwarded information to the interdepartmental Gilgo Beach Task Force from 10 inmates, who claim to have encountered Mr. Heuermann in contexts ranging from online date requests to in-person rendezvous.

Two women said that while working as escorts they had intimate encounters with Mr. Heuermann in which his violent and aggressive behavior left them frightened but not injured, said Errol D. Toulon Jr., the Suffolk County sheriff.

Mr. Heuermann’s lawyer did not respond to requests for comment.

Obtaining information from people working as escorts can be a challenge, partly because police interactions are often seen as adversarial and carry the risk of arrest. The jail setting offers the luxury of time, said Sgt. Erin Meunkle, the investigator who heads the sex-trafficking unit talking to the women.

Because people charged with prostitution are often assigned to treatment rather than jail, many of the female inmates the unit deals with are locked up on drug or robbery charges, and reveal only after personal discussions their histories of working as escorts or prostitutes, she said.

Jail offers the chance to foster relationships. The two investigators Sgt. Meunkle supervises, both women, typically dress in polo shirts and slacks rather than uniforms. Sgt. Meunkle said the officers avoid asking about an inmate’s current case. Their other role — offering drug counseling, job assistance, housing and support services — helps gain inmates’ trust.

Prosecutors say they already have a strong case against Mr. Heuermann, including DNA evidence, cellphone records and a witness’s description of his distinctive pickup truck. But hoping to learn more about possible crimes, Sheriff Toulon turned to the sex-trafficking unit, which largely works with female inmates forced into prostitution. Officials in neighboring Nassau County and at Rikers Island have agreed to use the same strategy in their jails.

When Mr. Heuermann first arrived at the jail, an imposing gray structure at the eastern end of the Long Island Expressway, he was put on suicide watch, stripped of belts and bedsheets and clad in a smock that restrained him.

“At the very beginning, he was laying on his bunk, either staring at the ceiling or on his side with his back to the wall,” the sheriff said. “He slept a lot.”

After more than two months, Mr. Heuermann seems to have settled into incarcerated life as his case crawls through numerous court conferences and hearings.

He now has bedsheets, and his smock has been replaced with a green uniform. For his own safety, he is kept apart from the general population, housed alone in a special unit and supervised around the clock by a dedicated guard. Supervisors check in regularly.

Mr. Heuermann’s 60-square-foot cell has a bunk, sink, toilet and plastic mirror. He reads books from the jail’s library, watches a television outside his cell (a guard handles the remote) and reads about his case in newspapers. He also receives letters and has gotten visit requests from journalists and true-crime fans, which he has refused. His now-estranged wife and children, still living in the family home in Massapequa Park, have not visited.

He is escorted many days to a fenced-off area in the exercise yard where he spends his allotted hour walking laps by himself. He meets with a chaplain and his lawyer, Sheriff Toulon said.

When the Gilgo Beach Task Force, which includes the sheriff’s office, was reconvened in early 2022, the sex-trafficking unit began using a questionnaire with interview subjects that included questions about dates with violent johns. After Mr. Heuermann’s arrest, the unit begin asking specifically whether chatter in escort circles had touched on anyone who might resemble Mr. Heuermann, who is an imposing 6-foot-4 and 240 pounds.

“These women all talk to each other to protect each other, because of the different types of men they might be encountering,” Sheriff Toulon said.

John Ray, a lawyer for two Gilgo victims’ families, said it was “prudent to go straight to the sex workers and try to get deep as they can into the subculture Rex Heuermann was existing in.”

But the remains of most of the victims, who had advertised on Craigslist, were found in 2010 and 2011. Mr. Ray called it unlikely that the unit would find information relevant to the Gilgo killings, which may have occurred more than 15 years ago.

“Most of escorts back then have died or retired,” he said.

Also, he said, the possibility of leniency offered by prosecutors in exchange for information raises credibility issues.

“Everyone they’re talking to is tainted, because people in jail are looking to score points to get out,” he said.

Sheriff Toulon said his unit lets inmates decide whether to speak to the task force. “There may be some individuals who want their 15 minutes of fame, but our goal is just to interview them and see what they know,” he said.

Speaking to women who have done escort work is a tactic that earlier versions of the task force failed to use, at least in one instance.

In 2011, the Manhattan-based Sex Workers Project was approached by Suffolk police officials hoping to get escorts to come forward with information, said Crystal DeBoise, the project’s co-director at the time.

The group was eager to help solve the case, one that had deeply upset the local “sex work community,” she said. The group suggested forming a task force to work with investigators and mentioned a potential resource: a “bad date” compilation that women maintained about troublesome clients, Ms. DeBoise said.

“We thought we had a treasure trove of information and a lot of people were willing to give it, if someone was willing to listen,” said Ms. DeBoise, a psychotherapist.

But first, she said, the group asked for assurance that the workers would not be arrested if they came forward. The investigators responded that they were no longer interested in the group’s help, she said.

“If they had worked with us, they would have had a tremendous amount of information they did not have access to,” Ms. DeBoise said, but without an offer of immunity, the women “never had the chance to speak.”

“Did one of these Gilgo victims think of calling the police and then decide against it?” Ms. DeBoise said. “Because you hear that a lot among sex workers: ‘I wish I could have called the police.’”