The temple follows the legend of it twin temple, Devapiran temple. As per Hindu legend, the place finds mention in Brahmanda Purana and Padma Purana where it is called Kedara Nilaya. Once a sage named Suprabha wanted to perform penance and in his search for land, he ploughed at this place. He found a balance (tola) and a bow (vil), which, when he lifted, turned into a couple. The couple were cursed by Kubera once for insulting them. Since the bow and balance were redeemed to their original form, the place is called Tolavillimangalam. The sage Suprabha continued to perform penance, at the end of which, the Devas received the share of offering (Havibhaga). Vishnu was pleased by the devotion of the sage and since he appeared with Devas, he came to be known as Devapiram.