The hostages were Yagev Buchshtab, Alexander Dancyg, Yoram Metzger, Nadav Popplewell, Chaim Perry, previously announced dead, and Avraham Munder, whose kibbutz of Nir Oz near Gaza announced his death earlier Tuesday.
Their families had been informed following intelligence analysis, the military said in a statement, later adding that the bodies were found on Monday night in a tunnel.
"During the operation, the forces located a tunnel shaft about 10 meters (yards) deep leading to an underground tunnel route where the bodies of the hostages were found," the military said.
"The rescue was carried out after prolonged combat in a built-up area and in multi-story buildings" against militants, some of whom were killed, it added.
Campaign group the Hostages and Missing Families Forum said in a statement that the recovery of the hostages' bodies "provides their families with necessary closure and grants eternal rest to the murdered".
The forum called on the Israeli government to ensure that the remaining hostages are also returned to Israel in a negotiated deal.
"The Israeli government, with the assistance of mediators, must do everything in its power to finalise the deal currently on the table," it said.
Mediators Egypt, Qatar and the United States have urged Israel and Hamas to agree a ceasefire deal that would help secure the release of remaining hostages in exchange for Palestinian prisoners held in Israeli jails.
Earlier on Tuesday, the Israeli kibbutz community of Nir Oz, near the Gaza border, announced the death of Munder, 79, "in captivity in Gaza after suffering physical and mental torture for months".
Metzger, Perry and Dancyg also hailed from Nir Oz, a community that was particularly hard hit in Hamas's October 7 attack that triggered the ongoing war.
Palestinian militants had abducted Munder, his wife, daughter and grandson that day.
The other family members were released during a one-week truce in November -- the war's only one so far.
Munder's son was killed in the October 7 attack, which resulted in the deaths of 1,199 people in Israel, most of them civilians, according to an AFP tally based on Israeli official figures.
Out of 251 people taken hostage that day, 105 are still being held hostage inside the Gaza Strip, including 34 the military says are dead.
Israel's retaliatory military campaign has killed 40,173 Palestinians in Gaza, according to the Hamas-run territory's health ministry, which does not give details of civilian and militant deaths.
Most of the dead are women and children according to the UN human rights office.