Maymun bin Mihran narrates from Ibn Umar (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) was asked about praying in a boat: "How should we pray in a boat?" He (peace and blessings be upon him) said: "Pray standing, unless you fear drowning."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5489