The Italian UN Development Programme employee was "in good" health" after his ordeal, the latest in a spate of abductions of Westerners in Yemen in recent months, a ministry official said.
The kidnappers were stopped at a checkpoint on the outskirts of Sanaa where they were arrested and the hostages freed, the official said.
He did not elaborate on the kidnappers' identity or motives.
Hundreds of people have been abducted in Yemen over the years, the vast majority by disgruntled tribesmen who use their hostages as bargaining chips with the central government and release them unharmed.
But in the past couple of years, Al-Qaeda's Yemen affiliate, regarded by Washington as its most dangerous, has brought a new, more threatening twist to the kidnappings.
The pair were seized from their car in the heavily patrolled Hada district of south Sanaa, where several embassies are located.
The kidnappers used a van and a taxi to sandwich the vehicle and then sped off with their hostages, witnesses said.
"The two people abducted were employees of the UN Development Programme," a source at the UN agency in Sanaa said.
In Rome, the foreign ministry confirmed that one of the two UN staff was Italian.
Since January 31st, three Europeans have been kidnapped. The most recent of them – a British teacher – was seized in Sanaa last month.
The stakes in kidnappings have been raised massively by Al-Qaeda in the Arabian Peninsula, which has held a number of hostages for extended periods and issued ultimatums to execute their prisoners.
Hostages held by the tribes have nearly all been well treated and released after short periods.
AQAP has been holding a South African teacher since last May, setting and then passing up on repeated ultimatums for ransom payments on pain of execution.
The group is also still holding a Saudi deputy consul kidnapped in the southern city of Aden in 2012.
And Iranian embassy staffer, Nour-Ahmad Nikbakht, who was abducted by suspected Al-Qaeda militants in Sanaa last July, also remains in captivity, tribal sources say.