Fiqh-us-Sunnah Volume 4, Funerals and Dhikr, Fiqh 4.040.
Prayer for peace and blessings upon the Prophet, peace be upon him, may be said in any form. If someone were to say: “O Allah, bless Muhammad,” it should suffice. It is better, however, to use the prayers transmitted through tradition, like the following:: Extravagance in Shrouding is Disliked
(Allahumma Salli ‘ala-Muhammad wa’ala ali Muhammad kama sallayta ‘ala Ibrahim wa ‘ala ali Ibrahim wa barik ‘ala Muhammad wa ‘ala ali Muhammad kama barakta’ ala Ibrahim wa ‘ala ali Ibrahim innaka hamidun Majid).” “O Allah! Grant peace to Muhammad and his family as you did to Ibrahim and his family. O Allah! Bless Muhammad and his family as you blessed Ibrahim and his family. Truly You are Most Glorious and Most Praiseworthy.’
This should be said after the second takbir, as is obvious, though there is nothing specifically reported in this regard as to its precise place in the funeral prayer.