Some of the hostages were held in sweltering tunnels deep beneath Gaza, while others were squeezed into tight quarters with strangers or confined in isolation. There were children forced to appear in hostage videos, and others forced to watch gruesome footage of Hamas’s Oct. 7 terrorist attack. They bore physical and psychological wounds.

As some hostages captured that day in the Hamas-led assault on southern Israel have been released, they have relayed these and other stories of their captivity to family members. While their individual experiences differ in some details, their accounts share features that corroborate one another and suggest that Hamas and its allies planned to take hostages.

The New York Times interviewed the family members of 10 freed hostages, who spoke on behalf of their relatives to relay sensitive information.

The relatives who spoke to The Times described how the freed hostages, many of them children, were deprived of adequate food while in Gaza. Many said they had received just a single piece of bread per day for weeks. Others were fed small portions of rice, or pieces of cheese. The Red Cross said it was denied access to the hostages.

Many of the hostages who have returned to Israel in the past week — part of a cease-fire deal between Israel and the armed group Hamas to trade hostages for Palestinian prisoners and detainees — have come home malnourished, infested with lice, ill, injured and deeply traumatized.

An aunt of Avigail Idan, a dual American Israeli citizen who was taken hostage after her parents were brutally killed, and who turned 4 a few days before being released, said her niece shared one piece of pita bread per day with four other captives and did not have a shower or bath during her 50 days in captivity.

Avigail IdanCredit…via the Idan family

According to the aunt, Tal Idan, the five hostages were kept in aboveground apartments, changing locations at least once. They were given a piece of pita with za’atar, a Middle Eastern spice mix, each day to share.

While Avigail was in captivity, her hair was shorn because she had developed a significant case of lice, Ms. Idan said. “She was covered in it. It took quite an effort to help her get rid of some of it the first night.”

The surprise of the terrorist attack on Oct. 7 and the abduction of so many people at once has been described as a national trauma for Israel, but it is also trauma borne by individuals.

In the attack, more than 1,200 people were killed and 240 were taken hostage, according to Israeli authorities. Since then, Israel has bombarded Gaza, with more than 13,000 people killed in the enclave since the war began, the Gazan health ministry estimates.

For the hostages, it has been a series of horrors — first the attack, then the abduction and then captivity itself.

Nurit Cooper, 79, was held in the warren of tunnels beneath Gaza with four older Israelis in the early days of the war. They were kept in a small room with little light or ventilation, according to Rotem Cooper, her son.

Ms. Cooper’s shoulder was broken “as part of the brutality of the kidnapping,” Mr. Cooper said. The group of hostages, all in their 70s and 80s, he added, struggled to walk in the dark, sandy tunnels.

Ms. Cooper and another hostage, Yocheved Lifshitz, 85, were released last month, but their husbands are still captive in Gaza. The captors took his glasses and have deprived him of needed medication, his son said.

Many of the family members interviewed, particularly the relatives of children whose parents or siblings remain in captivity, were reluctant to share the most incriminating details of their captivity lest the militants retaliate against the hostages still in their custody.

Others cautioned that they were reluctant to pry too much too soon, or to share publicly the most disturbing details in an effort to preserve their relatives’ privacy and to keep them from being retraumatized.

An aunt of Eitan Yahalomi, a 12-year-old kidnapped from the Nir Oz kibbutz and returned to his family on Monday, however, told a French television network that the boy had “lived through horrors” in Gaza.

The aunt, Devorah Cohen, said that when Eitan had arrived in Gaza he was set upon by a mob.

“When he arrived in Gaza, civilians hit him,” she told BFM TV, adding that the boy and other kidnapped children were forced to watch videos of the atrocities committed on Oct. 7. When he and others cried, she said, their captors threatened to shoot them.

Efrat Avsker, another of Eitan’s aunts, told The Times that the boy had “a long, long recovery, a long way to go.”

“But he is in good hands,” she added.

Eitan Yahalomi, in a photo distributed by the Hostages and Missing Families Forum. Eitan was returned to his family on Monday.Credit…Hostages and Missing Families Forum, via Associated Press

Ohad Yahalomi, Eitan’s father, was shot in the leg and arm trying to protect his family. He was kidnapped separately. Ms. Avsker said the family was very relieved to have Eitan home, but is deeply anxious about Mr. Yahalomi’s safety.

“We all must do everything we can, everything we can to get him and the others out,” she said.

By Thursday, 102 hostages had been released from Gaza, most of them women and children, ranging in age from 4 to 85. As part of the exchange, 210 Palestinians had been released from Israeli prisons, all of them women and teenagers.

On Wednesday, Hamas said the youngest of the hostages captured on Oct. 7, 10-month-old Kfir Bibas, had died with the other members of his family while in captivity. The Israeli military said it was assessing the accuracy of the Hamas statement, while a senior leader said the claims could be “psychological warfare.”

Survivors of kidnapping say the road ahead may be long for those released. But in the short term, some may feel uncomplicated relief. “The initial emotions after being rescued are joy and relief,” said Elizabeth Smart, a child safety activist who was kidnapped from her Salt Lake City bedroom in 2002 when she was 14 and held captive for nine months, during which she was raped. “It’s a miracle, and it’s an answer to prayer.”

For Noam and Alma Or, teenage siblings released this week, the joy of being freed was tempered by the news of a parent’s death.

Soon after embracing the newly freed teenagers, family members had to tell them that their mother had been killed and that their father was still missing.

“I know it was very difficult,” their uncle Ahal Besorai said in an interview, adding that the children asked that he not reveal too many details about their conditions in Gaza, beyond that it was “very unpleasant.”

The siblings, he said, survived their captivity in large part because they had each other.

“They said they actually supported each other, so if one of them had a bad day or a down day, the other would support him or her,” he said. “It created some kind of a bond.”

Families that were able to remain together, like the Or siblings, said they found solace in being together.

Three generations of the Munder family — Ruth, 78, Keren, 54, and her son Ohad, 9, — were held together in a room in Gaza with about 10 other hostages. The group slept on chairs and needed permission from their captors to use a toilet, which could sometimes take more than an hour to get, said Eyal Mor, a relative of the Munders.

It was in that room, Mr. Mor said, that the family learned that Ruth’s son, Keren’s brother, had died. They were listening to a report on Israeli radio, which they could occasionally hear.

Keren Munder and her son Ohad were held hostage along with her mother, Ruth.Credit…via the Munder Family

Since the family’s release, Ohad has been reluctant to open up about his abduction on Oct. 7, Mr. Mor said.

“You know, you can never know what will be the long-term impact of this trauma,” Mr. Mor said.

In these early days, Israelis are trying to bolster the spirits of the returning hostages however possible.

Ohad’s doctors made an exception to the visitation rules and allowed him to invite his eight best friends to see him at the Tel Aviv hospital where he was monitored.

Eitan, an avid soccer fan and player, got to meet players from Hapoel Be’er Sheva, his favorite team.

He was thrilled by the meeting, said his aunt, Ms. Avsker. But mostly, he is relishing the simple pleasures.

Eitan is happy to be home,” she said. “Happy to be hugged and loved by his mother and the whole family — and pretty much by the whole country.”

Reporting was contributed by Nadav Gavrielov, Roni Rabin, Talya Minsberg and Adam Sella.