"The meditation efforts worked. They were freed unharmed," the official told Reuters on Friday.
It was not immediately clear whether the government had agreed to the kidnappers' demand to free some family members, who are being held in jail pending trial, but previous negotiations with hostage-takers in Yemen have often been resolved through compromise.
The kidnappers had threatened to kill their captives if an attempt was made to free them by force.
The official said the Italians - two men and three women - would be transported by car to the main city in the largely lawless Marib province, and then flown by helicopter to Sanaa, the capital of Yemen.
The kidnapping of the Italians on Sunday was the fourth of Westerners in less than two months, and stoked fears of a return to the wave of abductions that swept Yemen several years ago.
Scores of tourists and foreigners working in Yemen have been kidnapped over the last decade by tribesmen demanding better schools, roads and services, or the release of jailed relatives, but most hostages have been released unharmed.
Ali Abdullah Saleh, the president of Yemen, has vowed to crack down on abductions and to prosecute kidnappers.
Yemen is trying to increase its tourism income, but attacks by militants linked to al-Qaida and kidnappings by disgruntled tribesmen have scared off many travellers.
The Italians were seized a day after five German hostages were freed unharmed.