Seeking forgiveness (istighfaar) after the obligatory prayers is proven to be something that the Prophet (blessings and peace of Allah be upon him) did, because of the report narrated by Muslim (1362) from Thawbaan (may Allah be pleased with him), who said: When he had finished his prayer, the Messenger of Allah (blessings and peace of Allah be upon him) used to ask for forgiveness three times and say: “Allaahumma anta al-salaam wa minka al-salaam, tabaarakta yaa dhaa’l-jalaali wa’l-ikraam (O Allaah, You are al-Salaam (the One Who is free from all defects and deficiencies) and from You is all peace, blessed are You, Possessor of majesty and honour).”
The view of the majority of scholars is that this istighfaar and the praise of Allah that follows it is only to be said after an obligatory prayer, so it is not to be said after a naafil (supererogatory) prayer.
But there is a du‘aa’ for seeking forgiveness (istghfaar) that is prescribed after all acts of worship, in general terms.
Allah, may He be exalted, has enjoined it after departing from Muzdalifah in Hajj, and after praying qiyaam al-layl (voluntary night prayers), and the Sunnah indicates that it is prescribed after doing wudoo’, after gatherings of dhikr (e.g., study circles), and in other circumstances.
It is a prayer seeking forgiveness for falling short in doing the act of worship. Allah, may He be exalted, says (interpretation of the meaning):
“… But when you depart from 'Arafat, remember Allah at al- Mash‘ar al-Haram. And remember Him, as He has guided you, for indeed, you were before that among those astray.
Then depart from the place from where [all] the people depart and ask forgiveness of Allah. Indeed, Allah is Forgiving and Merciful”
[al-Baqarah 2:198-199].
Ibn Sa‘di said in his commentary on this verse:
“Then depart from the place from where [all] the people depart” i.e., then depart from Muzdalifah, from where all the people have departed, from the time of Ibraaheem (peace be upon him) until the present. What is meant by this departing was well-known to them; it meant departing and stoning the jamaraat, offering the sacrifice, circumambulating the Ka‘bah (tawaf), going between as-Safaa and al-Marwah (sa‘i), staying overnight in Mina during the days of at-tashreeq, and completing all the other rituals of Hajj.
Because the purpose of this departing was as mentioned, and the things mentioned are the last of the rituals of Hajj, Allah commanded that when finishing them, we should ask Him for forgiveness and remember Him a great deal.
So forgiveness is sought for mistakes made by the individual when doing his act of worship, and for his shortcomings therein. Remembering Allah is thanking Allah for the blessing that He bestowed upon him by enabling him to do this great act of worship.
This is what the individual should do: every time he finishes an act of worship, he should ask Allah for forgiveness for his shortcomings, and thank Him for enabling him to do it. This is unlike the one who thinks that he has done the act of worship perfectly and has done a favour to his Lord by doing it, and that it will give him high status. Such a one deserves to be despised (by his Lord) and to have his deed rejected, just as the former deserves to be accepted and enabled to do more good deeds.
End quote from Tafseer as-Sa‘di (p. 92).
Allah, may He be glorified and exalted, praises those who focus on seeking forgiveness after praying tahajjud, as He, may He be exalted, says (interpretation of the meaning):
“They used to sleep but little of the night,
And in the hours before dawn they would ask forgiveness”
[adh-Dhaariyaat 51:17-18].
It was narrated from Naafi‘, that Ibn ‘Umar used to spend the night in prayer, then he would say: O Naafi‘, is dawn approaching? And he would say: No. So he would go back and pray some more, then he would say: O Naafi‘, is dawn approaching? And he would say: Yes. So he would sit and pray for forgiveness and offer supplication until dawn broke.
It says in Majma‘ az-Zawaa’id (9/346): It was narrated by at-Tabaraani and the men of its isnad are the men of as-Saheeh, apart from Asad ibn Moosaa, who is thiqah (trustworthy).
Al-Hasan al-Basri said in his commentary on the passage, (interpretation of the meaning): “They used to sleep but little of the night, And in the hours before dawn they would ask forgiveness” [adh-Dhaariyaat 51:17-18]:
They would make their prayer lengthy and pray with energy until, when dawn approached, they would begin to pray for forgiveness.
Tafseer at-Tabari (21/510).
It is narrated in a sound report from the Prophet (blessings and peace of Allah be upon him) that he offered the supererogatory Duhaa [mid-morning] prayer, then he followed it with istighfaar (prayer for forgiveness). It was narrated that ‘Aa’ishah (may Allah be pleased with her) said: The Messenger of Allah (blessings and peace of Allah be upon him) prayed Duhaa, then he said: “Allaahumma’ghfir li wa tubb ‘alayya, innaka anta at-Tawwaab ar-Raheem (O Allah, forgive me and accept my repentance; verily You are the Acceptor of repentance, the Most Merciful)”, and he repeated it one hundred times.
Narrated by al-Bukhaari in al-Adab al-Mufrad (619) and an-Nasaa’i in as-Sunan al-Kubra (9935); classed as saheeh by al-Albaani.
This was also narrated via an Ansaari man, but ‘Aa’ishah did not name him. An-Nasaa’i regarded this isnad as more likely to be sound, as he says in as-Sunan al-Kubra (9/46). See: Tuhfat al-Ashraaf (11/398).
This offers evidence from the actions of the Prophet (blessings and peace of Allah be upon him) for this practice.
Something similar was also narrated from ‘Umar ibn al-Khattaab (may Allah be pleased with him), but its isnad is da‘eef. See: It-haaf al-Khiyarah al-Mahrah by al-Busayri, no. 1757; al-Mataalib al-‘Aaliyah by Ibn Hajar (644), and the comments of the annotator.
And Allah knows best.
Conclusion:
Seeking forgiveness is prescribed, in general terms, after doing acts of worship, because of the shortcomings that may occur. So there is nothing wrong with seeking forgiveness after offering a naafil prayer, and there is no problem if the wording is that of the usual prayer for forgiveness that is recited after offering an obligatory prayer: by saying “Astaghfir Allah, astaghfir Allah, astaghfir Allah” and so on; in fact that is preferable to other words in this case.
Source:- Islamqa.info