According to a legend, a Brahmin sage, Divakara Muni Vilwamangalam, used this location to perform poojas and carry out penance. Once, Lord Narayana appeared before him in the avatar of a boy. The sage was overwhelmed with the divine radiance the child exuded and asked him who he was. The boy told him he was an orphan. The sage took pity and offered the boy to stay with him. The boy put a condition forth to the sage stating he would leave if he were ever humiliated. The sage agreed his condition and took him in happily. The young boy served the sage for some time but began playing juvenile pranks on him. When the pranks were intolerable, the sage reacted in a fit of anger. The young boy, feeling humiliated by the sage's reaction, proclaimed that he will leave him and if the sage wishes to see him again, he will have to go to the forest of Serpent God, Anantha. This forest is also known as Ananthankat.
The sage soon realised that the boy was an avatar of God himself and he followed him. He soon found a cave where the boy had disappeared. He followed the route and reached the sea. As he walked further down south, he reached an area near the sea that had Illipa trees (Mahua trees). It was here that the sage saw the child disappear into a huge Illipa tree which fell immediately and took the form of Lord Vishnu resting on thousands of serpents.
According to another interesting legend, a devotee of Lord Krishna, Sree Vilvamangalathu Swami, was doing a pooja for Krishna. Lord Krishna appeared at the location in the avatar of a young boy and began troubling him to disturb the pooja. Saint Vilvamangalathu got annoyed and pushed the boy aside. The boy disappeared into a cave, and when the saint saw this, he realised that it was nobody ordinary but Lord Krishna himself.