Tirupati Temple History
Tirupati Temple History. as stated in Bhavishyottara Purana
Once a number of Rishis (sages) assembled on the bank of the Ganga and got things ready to perform Yajna. Narada came to them and asked them which god they intended to please by performing the sacrifice. The Rishis were nonplussed and requested the sage, Bhrigu, to solve the problem. That sage undertook to solve the problem by examining the three chief divinities. He first went to Brahma and found him busy chanting the Vedas with one mouth, uttering Narayana Mantra with another and looking at Vani with the third face. He took no notice of Bhrigu. Then the sage went to the abode of Siva. There again he found Siva fully absorbed in sporting with his consort and not taking notice of Bhrigu's arrival and presence. From here Bhrigu went to Vaikunta and found Vishnu similarly engaged in amours with Lakshmi. Disgusted with this, Bhrigu kicked Vishnu on his Chest (Vaksha Sthala). Vishnu immediately got up, apologised Rishi for not noticing. Vishnu knows that the Sage is impulsive due to the presence of the third eye in his foot. Vishnu started pleasing sage by massaging Bhirgu's foot and enquired if it had been injured, while sage was in different he then pluck the third eye out. Sage Bhrigu then realised his mistake and apologised for his acts and left Vaikunta seeking blessings from Vishnu.
Lakshmi was angered because Bhrigu kicked the spot which was her favorite resort on the bosom of the Lord and went away to Karavirapura or Kolhapur to stay there, leaving Vishnu. Unable to bear the solitude, Vishnu left Vaikunta and wandered about. In course of time, he came to Seshachala, found it sufficiently interesting and settled down on the mountain in an ant-hill on the bank of the Swamy Pushkarini.
Tirupati Temple History from Brahma Purana
Once Vishnu wanted to have a change from his usual abode in Vaikuntha. He asked Sage Narada to suggest a place on The Earth which would be suitable for diversion and sport. Narada suggested the neighbourhood of the place where Seshachala came to be located later on. Subsequently Vayu and Sesha disputed their relative strength and entered into a serious dispute. Sesha wound his long body around a part of Meru and challenged Vayu to move it. Vayu did his best to shake the hillock but could not. Ultimately, Sesha opened his mouth to breathe and taking advantage of it, Vayu entered his body and blew off part of the hill. After the hill had travelled a long distance, Meru interfered and requested Vayu to leave it there and the later did so. Ashamed of his defeat, Sesha did penance thinking for Vishnu. Vishnu appeared before him with all his properties (Sanku, Chakra, Gadha) and offered a boon. Sesha, assuming the shape of a hill, requested the Lord to stay on his head, wanted the hill to be known as Seshachala. Vishnu thought of Narada's suggestion, made previously, and agreed to live on seshachala.
Tirupati Temple History Reference Link: Tirupati Balaji Temple