Al-Aswad (may Allah have mercy on him) narrates from Sayyiduna Abdullah (may Allah be pleased with him) concerning a man who recites, in prayer, a surah at the end of which there is a prostration: if he wishes he may bow, and if he wishes he may prostrate. Then he should stand up, recite, bow and prostrate.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3764