It comes after some hostage's families visited Qatar and told mediators loved ones needed important prescription medication, CBS News reports.
Deliveries have not begun yet, and it is not clear how medicine will be transported.
Israel believes there are around 105 hostages still alive in Gaza.
An estimated 240 people were taken prisoner in Hamas's 7 October attacks, but 105 were later released by Hamas during a six-day ceasefire at the end of November, and at least 25 are believed to be dead.
Both Hamas and Israel have shown willingness to allow the medicines to reach hostages, reports the BBC's international partner, CBS News, quoting a diplomatic source.
Mediators are working with the two sides and with international NGOs to understand which medications are needed, how many, and how they can be delivered, the source adds.
According to a statement from the Israeli prime minister's office on Friday, the medicine will be delivered in the next few days.
The statement also said the deal was brokered after David Barnea, director of Israel's national intelligence agency Mossad, approached Qatar.
A Palestinian official told the BBC there had been discussions about bringing medical aid into Gaza, part of which covered "the needs of the Israeli hostages in Gaza".
In a letter sent to the Israeli war cabinet after the ceasefire ended last year, the Hostages Families HQ group said they had "solid intelligence that there are abductees whose condition has deteriorated and are now in immediate danger".
They said at least a third of the hostages were suffering from underlying illnesses and needed regular medical treatment - and going without such treatment was dangerous.
Since the 7 October attacks, more than 23,350 people have been killed in Gaza - mostly children and women - during retaliatory military action by Israel, according to the Hamas-run health ministry.
Israel says around 1,300 people - mostly civilians - were killed in the Hamas attack.
By Natasha Preskey