IT IS SUNNAH to say when lifting the head: Allah has heard the one who praised Him. It is also permissible to say: The one who praised Allah, He has heard him, as ash-Shāfi‘ī stated in al-Umm.
Sami‘a-llāhu li-man ḥamidah.
When standing upright one should say: O our Lord, to You belongs praise, praise that is good and blessed—praise to fill the heavens and the earth and all that is between them, and to fill whatever You desire besides. You are most worthy of adulation and praise; You are entitled to whatever the servant says, and all of us are servants to You. O Allah, none can withhold what You grant and none can grant what You withhold. The might of the mighty does not avail him before You.

Allāhumma Rabbanā laka-l-ḥamd ḥamdan ṭayyiban mubārakan fīh, mil’a-s-samāwāti wa mil’a-l-arḍi wa mā baynahumā, wa mil’a mā shi’ta min shay’in ba‘d. ahla-th-thanā’i wa-l-majd, aḥaqqu mā qāla-l-‘abdu—wa kullunā laka ‘abdun—lā māni‘a li-mā a‘ṭayt, wa lā mu‘ṭiya li-mā mana‘t, wa lā yanfa‘u dha-l-jaddi minka-l-jadd.
We relate in the Ṣaḥīḥs of al-Bukhārī and Muslim that Abū Hurayrah
reported that the Messenger of Allah
used to say: “Allah has heard the one who praised Him” when he rose from rukū‘. Then he used to say, when he stood up: “Our Lord, to You belongs praise.” According to another report he said: “And to You belongs praise”, adding the word “And”. Both of these are good; they have been reported by a number of the Companions
. [1].
We relate in the Ṣaḥīḥ of Muslim that ‘Alī
and Ibn Abī Awfā
reported that when the Messenger of Allah
rose from rukū‘ he would say: “Allah has heard the one who praised Him. O our Lord, to You belongs praise—praise to fill the heavens and the earth, and whatever You desire besides.” [2].

Sami‘a-llāhu li-man ḥamidah, Rabbanā laka-l-ḥamd, mil’a-s-samāwāti wa mil’a-l-arḍi wa mil’a mā shi’ta min shay’in ba‘d.
We also relate from the Ṣaḥīḥ of Muslim that Abū Sa‘īd al-Khudrī
reported that when the Messenger of Allah
raised his head from rukū‘ he would say: “O Allah, our Lord, to You belongs praise—praise to fill the heavens and the earth and all that is between them, and whatever You desire besides. You are worthy of adulation and praise. You are best entitled to whatever the servant says, and all of us are servants to You. O Allah, none can withhold what You grant and none can grant what You withhold. The might of the mighty does not avail him before You.” [3].

Allāhumma Rabbanā laka-l-ḥamdu mil’a-s-samāwāti wa-l-arḍ, wa mil’a mā shi’ta min shay’in ba‘d, Ahl ath-thanā’ī wa-l-majd, aḥaqqu mā qāla-l-‘abdu—wa kullunā laka ‘abd—Allāhumma lā māni‘a li-mā a‘ṭayt, wa lā mu‘ṭiya li-mā mana‘t, wa lā yanfa‘u dhā-l-jaddi minka-l-jadd.
We relate in the Ṣaḥīḥ of Muslim that Ibn ‘Abbās
reports that he
said: “O our Lord, to You belongs praise—praise to fill the heavens and the earth and all that is between them, and to fill whatever You desire besides.” [4].

Rabbanā wa laka-l-ḥamdu mil’a-s-samāwāti wa mil’a-l-arḍi wa mā baynahumā, wa mil’a mā shi’ta min shay’in ba‘d.
And we relate from the Ṣaḥīḥ of al-Bukhārī that ar-Rifā‘ah ibn Rāfī‘ az-Zuraqī
narrated: “One day we were performing ṣalāh with the Messenger of Allah
and he said: ‘Allah has heard the one who praised Him.’ A man said: ‘O our Lord, to You belongs praise, praise that is abundant, good and blessed.’ When he
turned around he
said: ‘Who was it who spoke?’ The man said: ‘It was I.’ He
said: ‘I saw about thirty angels hastening to see which of them would write it first.’” [5].
Rabbanā wa laka-l-ḥamdu ḥamdan kathīran ṭayyiban mubārakan fīh.
Know that it is mustaḥabb to combine all the adhkār mentioned, as we stated about the adhkār of rukū‘. If one wishes to shorten them, he should shorten them to: Allah has heard the one who praised Him. Our Lord, to You belongs praise—praise to fill the heavens and the earth and all that is between them, and to fill whatever You desire besides.

Sami‘a-llāhu li-man ḥamidah, Rabbanā laka-l-ḥamdu mil’a-s-samāwāti wa mil’a-l-arḍi wa mā baynahumā, wa mil’a mā shi’ta min shay’in ba‘d.
If one wants to shorten them even more, he should say: Allah has heard the one who praised Him. Our Lord, to You belongs praise.
Sami‘a-llāhu li-man ḥamidah, Rabbanā laka-l-ḥamd.
Know that these adhkār are mustaḥabb for the Imam and those following, and for those praying alone. However, the Imam should not utter all of them unless he knows from the condition of the followers that they prefer prolongation. Note also that this dhikr is Sunnah and not wājib; so if one leaves it out, that is makrūh but one does not have to prostrate for forgetfulness. It is makrūh to recite Qur’ān while standing up at this point of the prayer, just as it is makrūh in rukū‘ and sujūd. And Allah knows best.
References
[1] Al-Bukhārī (784) and Muslim (392).
[2] Muslim (476), Abū Dāwūd (846), and at-Tirmidhī (3541).
[3] Muslim (477), Abū Dāwūd (847), and an-Nasā’ī (2/198–199).
[4] Muslim (478) and an-Nasā’ī (2/198).
[5] Al-Bukhārī (799), al-Muwaṭṭa’ (1/212), Abū Dāwūd (770), at-Tirmidhī (404), and an-Nasā’ī (2/196).