Either Parashurama consecrated the reclining image, or Vishnu appeared to the sage Vilwamangalam as a mischievous boy and became a falling tree that took the shape of Ananta Padmanabha.
The older account gives the temple to Parashurama. In the Dvapara age the axe-bearing avatar cleansed and honoured the reclining image, appointed the Potti families to serve it, and gave the Tharananallur Namboothiripad charge of its rites. The temple is named in the Sangam-era Silappatikaram, and Marthanda Varma of Travancore brought twelve thousand shaligrama stones from the Gandaki for it before making the god his sovereign in 1750.
The later story is a sage's vision. Vilwamangalam, worshipping alone, was pestered by a small boy who kept spoiling his offerings; when the sage lost his temper the child disappeared, saying he could be found in the Ananthavanam. Wandering there the sage overheard a woman of the Pulaya caste, angry with her child, threaten to throw it into the forest, and he followed. The child ran into an enormous iluppa tree, which crashed down and lay stretched out as the reclining Vishnu — head at Thiruvallom, navel at Thiruvananthapuram, feet at Thrippadapuram. That is why the god is seen in three parts through three doors, and why the little Ananthankadu Nagaraja shrine survives to the temple's northwest.
What is different here:
Replaces Parashurama's consecration with a self-manifestation through a sage and a falling tree; rated more recent and less regarded by Wikipedia.