The men used brooms and motorcycle helmets to attack the couple in 2008, aiming to cure them of their smoking habit and other problems.
They were acting on a third man's advice, who said he had magical powers and could raise the dead.
The court ruled he had been mentally unsound at the time of the killings.
The court in Kuala Lumpur heard how Muhammad Fauzi Abdul Razak, now 23, and Muhammad Nizam Mohd Ibrahim, 21, beat the latter's parents at a family gathering in October 2008.
They had said they were acting on the advice of Muhammad Fauzi's brother, Muhammad Ilyas Abdul Razak, who testified in court that he had been given powers by the leader of a banned cult, enabling him to cure illnesses and raise the dead.
The parents were expected to be revived later on but had been too severely beaten. Several other family members, including a child, were also injured.
High Court judicial commissioner Azman Abdullah said the convicted men had been duped by the superstitious beliefs of Muhammad Ilyas and had "failed to use their reasonable judgement", Malaysia's Star newspaper reported.
He said they had acted in "ignorance and blind faith" in carrying out the attack, which he described as "beyond imagination".
The two men were both sentenced to 10 years for each of the murders, with the sentences to run concurrently.