The Israeli military said it would stop firing from 10:00 to 15:00 (07:00-12:00 GMT) on Thursday to allow residents in Gaza to stock up on supplies.
Hamas spokesman Sami Abu Zukhri later confirmed that his group would also stop rocket attacks in that time.
Officials in Gaza say Israeli raids have left 220 Palestinians dead. Hamas rocket attacks have killed one Israeli.
Israeli army officer Brig Gen Yoav Mordechai told BBC Arabic that the ceasefire had been requested by the UN and other international organisations.
An Israeli military statement warned that Israel would respond “firmly and decisively” should Hamas launch attacks during the ceasefire window.
Four children were among those killed in Israeli strikes on Wednesday. They died while playing on a beach near Gaza City.
The Israeli military said they were “carefully investigating” the incident, adding that “based on preliminary results, the target of this strike was Hamas terrorist operatives”.
“The reported civilian causalities from this strike are a tragic outcome,” the statement said.
Israel launched its military operation on 8 July with the stated objective of halting Palestinian rocket attacks on Israel.
However, the UN says most of those killed in Gaza have been civilians.
Israel accuses Hamas of hiding its military infrastructure within the civilian population.
Yolande Knell, BBC News, Gaza
We heard loud thuds by the coast and saw smoke rise behind a beachside hotel used by journalists. The boys who were killed were from a family of fishermen who work in the nearby port. It’s understood that they were playing by a shipping container. Witnesses said the site was hit twice.
Hamas described the attack as a war crime, and called for the United Nations to condemn it. Israel’s military says it’s investigating what happened. It often targets open areas by the sea which are used by militants to launch rockets into its territory.
Health officials here say 213 Palestinians have been killed in the past nine days. Earlier, in Israel, there was a funeral for the first Israeli civilian killed in this conflict. He was hit by a mortar shell fired from Gaza near the northern border with Israel.
Kevin Connolly, BBC Middle East correspondent, Jerusalem
Israel has acknowledged that at least one attack which caused civilian casualties earlier in this conflict was a tragedy – and while it will argue that such incidents take time to investigate, it may do so again.
But its underlying position does not change. It blames Hamas for civilian fatalities and injuries at two levels. First, it says Hamas bears overall responsibility for the flare-up of hostilities and second, it argues that the Israeli armed forces go to great length to avoid civilian casualties.
It says Palestinian militants use their own people as human shields. Palestinians don’t accept any of that. They point angrily to the civilian death toll and feel they are being subjected to brutal collective punishment.
Israel takes every opportunity to make its case to the international community. By accepting the first Egyptian ceasefire proposal, when Hamas did not, it believes it has the political and diplomatic high ground. Attempts to broker a ceasefire may go on – but so does the fighting.
Meanwhile, reports in Israeli media say Hamas has presented a list of 10 prerequisites for a 10-year truce with Israel.
The demands reportedly include the easing of the economic blockade on Gaza and a stop to Israeli strikes on the territory, as well as the construction of an airport and seaport.
The Israeli military says its Iron Dome missile shield shot down 23 rockets launched from Gaza on Wednesday, while others struck without causing casualties.
Israel has mobilised tens of thousands of troops on the border with Gaza amid speculation that a ground invasion could be launched.
The UN says at least 1,370 homes have been destroyed in Gaza and more than 18,000 people displaced in recent hostilities.
Are you in the area? Please get in touch by emailingHaveyoursay@bbc.co.uk putting the word ‘Gaza’ in the subject heading.