Egyptian officials brokered the deal between the detainees and Israeli Prime Minister Binyamin Netanyahu Monday, which dictates all five will accept food within 72 hours.
In exchange, Israel has agreed to either release detainees when their terms of administrative detention are over, or to provide them with a list of charges to be brought against them, Ma'an news agency reported.
The five on strike -- Thaer Halahla, Bilal Diab, Jaafar Izz Addin, Omar Shalal and Hasan Safadi -- began protesting their arrest without charge months ago, and have been on strike for different periods of time. Diab and Halahla have held out the longest, each refusing food for 77 days.
Shortly after the five began their protest, some 2,000 prisoners across the country went on hunger strike on April 17, demanding better conditions, Ma'an reported.
Israel also agreed to revoke the "Shalit law" which restricted prisoner access to family members as well as educational materials. The law is named for Israeli solider Gilad Shalit, who was detained in Gaza for five years. Shalit was released in October in a prisoner swap.