President Prabowo Subianto granted the release of remaining Bali Nine members Matthew Norman, Scott Rush, Martin Stephens, Si Yi Chen and Michael Czugaj, who had been serving life sentences for trying to smuggle 8kg of heroin.
Indonesia has some of the world's strictest drug laws and Australian officials had little luck pushing for repatriation with former president Joko Widodo, who had billed himself as tough on drugs.
Mr Prabowo does not have the same political constraints, with a history of being a military general and serious human rights allegations, Indonesian law expert Tim Lindsey said.
The men's release also helped deal with an overcrowded prison system, Professor Lindsey said, ahead of plans to pardon tens of thousands of inmates on humanitarian grounds.
Mr Prabowo spent the presidential campaign painting himself as an "unthreatening grandfather" and was focused on Indonesia playing a bigger role on the international stage.
The president is also reportedly planning on releasing a French prisoner and a Filipino sentenced to death for drug smuggling.
"What I think he's doing is sending a signal globally that despite his terrible history of human rights, he's someone the West can engage with," Prof Lindsey told AAP.
Indonesia's President Prabowo Subianto granted the release of the five remaining Bali Nine members. (Lukas Coch/AAP PHOTOS)
"It means it's much easier for countries that have abolished the death penalty, like Australia and the EU, to engage with him."
Despite the previous president's tough-on-drugs stance, there would not be major concerns in Indonesia about the repatriation, Prof Lindsey said.
"This is a president who had a massive landslide win ... and he's still in the middle of their honeymoon period.
"He has got a huge political capital and it's something he can probably get away with."
Prime Minister Anthony Albanese said the agreement had been reached with his Indonesian counterpart on humanitarian grounds rather than a prisoner swap.
Anthony Albanese says the men were returned to Australia on humanitarian grounds. (Bianca De Marchi/AAP PHOTOS)
"This is an act of compassion by President Prabowo ... it was time for them to come home," he said.
Criminal justice expert Emeritus Professor David Brown said the five men "will face a myriad of difficulties in settling back into life in Australia".
"These include overcoming trauma; reconnecting with family and friends; gaining employment; managing technological and social change; dealing with their notoriety and facing media and public intrusion and harassment," he told AAP.
The men, who have not been pardoned - are banned from re-entering Indonesia.