The marines shot dead the fishermen off India's southwestern coast near the port city of Kochi in February while guarding an Italian oil tanker, but they deny murder on the grounds that they mistook their victims for pirates.
Judge P. Bhavadasan of the Kerala state high court relaxed the bail conditions and said the marines should "pledge a bank guarantee for 60 million rupees ($1.1 million) and should return to Kochi on or before January 10".
Italy's ambassador gave the court an undertaking that Massimiliano Latorre and Salvatore Girone would return to India to face trial in a case that has caused a diplomatic row between the two countries.
"Italy has no intention to meddle with the Indian judicial system," lawyer P. Udhayabhanu, who represented the marines, said.
"The ambassador has given an assurance, that the government would ensure the return of the accused."
Rome has repeatedly called the case against the two men illegal and has appealed to India's Supreme Court to quash it.
Italy insists the marines should be prosecuted in their home country because the shootings involved an Italian-flagged vessel in international waters, but India says they took place in waters under its jurisdiction.
Lawyer T. Asif Ali, who represented the Kerala state government, called for the marines' bail request to be rejected, arguing that the two men may not return to India for their trial.
"If the government of Italy withholds them for further prosecution of the case, we have no legal remedy to bring them back," he said.
The marines' families said they were delighted with the news.
"This is a moment of great joy," Girone's wife, Vania Ardito, told Italian news agency ANSA. "We got the best Christmas present."
Armed guards are increasingly deployed on cargo ships and tankers in the Indian Ocean to tackle the threat posed by Somali pirates, who often hold ships and crews hostage for months demanding multi-million-dollar ransoms.
Italian defence minister Giampaolo Di Paolo visited the two marines last Sunday and made a public appeal for the men to be allowed home to spend Christmas at home.
The marines' fate has attracted widespread interest in Italy, and also caused a stir at the Indian Grand Prix near New Delhi in October.
Ferrari was forced to deny that its decision to put Italian naval flags on its cars for the race was a sign of support for the marines.
Since being granted bail in May, the two marines have been living in Kochi under court orders not to leave the town.