Sunan Abi Dawud Book 2, Hadith 380
One day we were praying behind the Messenger of Allah (ﷺ). When the Messenger of Allah (ﷺ) raised his head after bowing, he said: Allah listened to him who praised Him. A man behind the Messenger of Allah(ﷺ) said: O Allah, Our Lord, and to Thee be praise, much praise, good and blessed. When the Messenger of Allah (ﷺ) finished his prayer, he asked: Which of you if the one who spoke (the words) just now. The man said: I (uttered) these words, Prophet of Allah. The Messenger of Allah(ﷺ) said: I saw more than thirty angels racing against one another to be the one to write them first.
There is no harm in uttering supplication in prayer, in its beginning, in its middle, and in the end, in obligatory prayer or other.
When the Messenger of Allah (ﷺ) stood up for praying at midnight, he said: o Allah, be praise to Thee, Thou art the light of the heavens and the earth; and to Thee be praise; Thou are the maintainer of the heavens and the earth; and to Thee be praise, Thou art the heavens and the earth and what is between them; Thou art the truth, and Thy statement is truth; and Thy promise is the truth; and the visitation with Thee is true; and the Paradise is true and the Hell-fire is true and the Hour is true; O Allah, to Thee I turned my attention, and by Thee I disputed, and to Thee I brought forth my case, so forgive me my former and latter sins, and my secret and open sins, Thou art my deity, there is no deity but Thou.