In doing so he said "God has accepted the nation's prayers", and the accord would lift "inhumane and tyrannical sanctions" that have caused years of economic distress to people and businesses.
Rouhani spoke minutes after US President Barack Obama's comments on the agreement struck in Vienna were broadcast live on Iranian state television.
But Obama's speech was cut off when Rouhani, who has staked his presidency on resolving the nuclear standoff with the West, took to the podium to address the nation.
"This is a mutual deal, a reciprocal deal," he added, noting that "all our objectives" had been met under the final deal as sanctions would be lifted and a civilian nuclear programme acknowledged.
More From This Section
The deal would "take the nuclear dossier" out of the UN Security Council's remit, reversing what he called "illegal resolutions" passed by the world body.
The long-sought accord came after 18 days of talks in Vienna, the culmination of 22 months of diplomacy between Iran and the P5+1 group -- Britain, China, France, Russia and the United States plus Germany.
There can now be "a focus on shared challenges", he added, alluding to Sunni Muslim extremists of the Islamic State group, who from their base in Iraq and Syria are launching attacks on both Shiite and Western targets worldwide.
Rouhani's tweet came shortly after Iranian Foreign Minister Mohammad Javad Zarif announced at talks in Vienna: "We are starting a new chapter of hope."
Since his election in 2013, Rouhani has sought to end the 13-year-old standoff with Western governments over Iran's controversial nuclear programme - and with it the sanctions that have paralysed the economy.