The UN-brokered deal between a Saudi-led coalition and the Houthi group aligned with Iran is the most significant step yet towards ending a conflict that has killed tens of thousands and pushed millions into hunger.
The last co-ordinated cessation of hostilities across the country was during peace talks in 2016.
UN special envoy Hans Grundberg said the two-month truce would come into effect on Saturday and could be renewed with consent of the parties.
"The parties accepted to halt all offensive military air, ground and maritime operations inside Yemen and across its borders; they also agreed for fuel ships to enter into Hodeidah ports and commercial flights to operate in and out of Sanaa airport to predetermined destinations in the region," he said in a statement.
The UN and US envoys had been trying since last year to engineer a permanent ceasefire needed to revive political negotiations stalled since late 2018 to end the conflict.
The Saudi-backed Yemeni government, which the Houthis ousted from the capital Sanaa in late 2014, said earlier it would facilitate arrangements for release of prisoners, opening Sanaa airport and allowing fuel vessels into Houthi-held Hodeidah port.
"We immediately announce the release of the first two fuel ships through Hodeidah port," Foreign Minister Ahmed Bin Mubarak said on Twitter.
Houthi chief negotiator Mohammed Abdulsalam welcomed the truce.
Another senior Houthi official, Mohammed Ali al-Houthi, said on Twitter its "credibility would be in implementation".
The Saudi-led coalition, which intervened in March 2015 against the Houthis, controls Yemen's seas and air space.
The warring parties are also discussing a prisoner swap under which hundreds from both sides would be freed, including 16 Saudis, three Sudanese and a brother of Yemeni President Abd-Rabbu Mansour Hadi.
The last major prisoner swap, involving about 1000 detainees, took place in 2020 as part of confidence-building steps agreed at the last peace talks held in December 2018.