The Salat was made compulsory on all the holy messengers of Allah right from the Holy Prophet Hadrath Adam (A.) to till date. However the number & mode was different. & now in Islamic shariat the procedure prescribed is most perfect.
Qur'an al-Isra' (The Night Journey) And when harm touches you upon the sea, those that you call upon besides Him vanish from you except Him (Allah Alone). But when He brings you safely to land, you turn away (from Him). And man is ever ungrateful.