Once, when lord Vishnu awakened from his yoga nidra, he found that the Vedas had submerged in the ocean as the result of Pralaya (deluge). He incarnated as matsya (fish) to retrieve the Vedas from the ocean-bed. As soon as lord Matsya entered into the ocean, He attained such an enormous size that the deities became frightened.
All the deities then eulogized lord Matsya and requested him to regain his original form- “O Narayan- the imperceivable lord. You manifest yourself in each and every particle of this Universe. You are omnipresent and exist even during the time of deluge when nothing else exist. O Lord! We are scared of your present form.”
On seeing the deities frightened, lord Matsya retrieved the Vedas from the sea-bed and transformed his appearance from the huge fish to that of lord Vishnu. The deities were filled with joy to see the divine appearance of lord Vishnu.