More than 100 illegal Indonesian migrants who survived a deadly boat accident off the coast of Malaysia have been given a special amnesty to return home.

Fourteen people died when the rickety wooden boat, believed to be carrying 140 people, sank on Tuesday off Port Klang en route to Indonesia's Sumatra island, across the narrow Straits of Malacca.

Most of those aboard were trying to get home to celebrate the Hari Raya festival with their families, marking the end of the Muslim holy fasting month of Ramadan.

"Due to the tragedy and the trauma the illegals were subjected to, we will not be taking any action against them," immigration enforcement director Ishak Mohamed was quoted as saying by the Malay Mail newspaper.

"We are doing this on humanitarian grounds."

RM1,500 for doomed trip

Ishak said a Malaysian marine boat had taken 103 of them home on Thursday, while 22 others were still recuperating at a local hospital.

Survivors told local media they were tricked into paying high prices to board the boat in their desperation to get home for Hari Raya after they failed to get air or ferry tickets for a legal passage home.

"We were given the assurance that a ferry was waiting for us at sea and that the journey on the wooden boat ... would be a short one," 29-year-old Santi Buyong told the Malay Mail.

Buyong's two-month old infant was on a ventilator after nearly drowning, and her three-year old son is still missing.

She said she had paid RM1,500 for the doomed trip.

Another survivor, 37-year-old domestic helper Seri Kandi, said she had to resort to the rickety boat as she did not have valid travel documents.

Police have said the boat capsized because it was overloaded.