In ‘Padma purana’ and in ‘Srimad Bhagavata purana’ It discrided about Lord Vishnu who took incarnation as Matsya avatar to retrive stolen Vedas. Matsya avatar is Lord Vishnu’s first avatar.
Who are Makar and Hayagreeva who stole Vedas
Lord Brahma had created numerous Prajapatis like Bhrigu, Marichi, Atri, Daksha, Kardam, Pulastya, Pulaha, Angira and Kratu. Marichi was the father of Kashyap. Sage Kashyap had four wives–Aditi, Diti, Kadru and Vinta.
Aditi was the mother of Deities while Diti gave birth to demons like Makar, Hayagreeva, Mahabali, Hiranyaksha, Hiranyakashipu Jambha, Maya etc.
Note: Here Demon means ‘demon like qualities’ not in appearance. Those days Demons are those who misused the knowledge of Vedas or dint have the knowledge of Vedas and stuck in material dark world. Dities means who know the Knowledge of Vedas and used it for right purpose. It is like in present day life intelligent people using technology for both good and bad purposes.
Vedas were hidden in ocean after stealing
At the end of last Kalpa, Brahma had fallen asleep, causing a Pralaya.
As per the Padma Purana, Makar stole the vedas while Bagavata purana says Hayagreeeva stole the vedas but both are brothers and their mother is Diti. (It might be the plan of both brothers Makar and Hayagreeva)
So One of the brothers after deceitfully acquiring the Vedas, they hid the Vedas and themselves in the ocean. Lord Brahma requested Lord Vishnu to help him retrieve the lost Vedas back.
Lord vishnu’s Matsya Avatar & Satyavrat successful penance
There was a King named Satyavrat during that time. The King was observing severe penance sustaining himself on water only . The same King Satyavrat has come to be known as Shraddhdev, the son of Surya (Vaivashvat) in the present Kalpa.
One day, Satyavrat was taking a bath in the river, a small fish came in his folded palms. The fish requested the king to save him.
The King put the fish in Kamandalam (coconut shell bowl) but as the fish grew bigger in no time the King transferred the fish into another bigger pot, but again it grew too big that king transferred into the lake. Now the fish grew as big as lake then the King Satyavrat grew suspicious.
Ending of Kalpa and retriving vedas
So with folded hands, the King requested the fish to appear in its real form. Instantaneously, Lord Vishnu appeared and told the King that “As the Present Kalpa is getting over, there will be the ‘Pralaya’ seven days from now and all the three lokhas will submerge in water and get destroyed. But I will send a boat for you. You will board the boat and tie it to my horns with Vasuki, the Naga. Now Put me into the sea to retrieve the Vedas back which were stolen “.
Then King leaves the fish into the sea.
On the seventh day, dense clouds gathered in the sky and began to rain heavily. Soon entire earth started flooding. The King Satyavrat found the boat sent by Lord. Boarding the boat, Satyavrat feared by the Pralaya prayed to Lord Vishnu. Lord Vishnu then Preached him about the ‘Kala'(The time).preached him the knowledge of metaphysical. Thereafter, the Lord Vishnu killed the demon and retrieved the Vedas from demon. Lord vishnu then took those Vedas and gave back to lord Brahma.