And in the hours before dawn, they were asking for forgiveness.
Mujahid and several others said;
"They were performing Salah."
Others said that they would stand in prayer during the night and delayed asking Allah for forgiveness until the latter hours before dawn.
As Allah, the Exalted the Blessed, said;
وَالْمُسْتَغْفِرِينَ بِالاٌّسْحَارِ
And those who seek forgiveness during the last hours of the night. (3;17)
This is because it is better if asking for forgiveness is done while praying.
It is confirmed in the Sahih collections as well as others, from several Companions, that the Messenger of Allah said,
إِنَّ اللهَ تَعَالَى يَنْزِلُ كُلَّ لَيْلَةٍ إِلَى سَمَاءِ الدُّنْيَا حِينَ يَبْقَى ثُلُثُ اللَّيْلِ الاَْخِيرُ فَيَقُولُ
هَلْ مِنْ تَايِبٍ فَأَتُوبَ عَلَيْهِ
هَلْ مِنْ مُسْتَغْفِرٍ فَأَغْفِرَ لَهُ
هَلْ مِنْ سَايِلٍ فَيُعْطَى سُوْلَهُ
حَتْى يَطْلُعَ الْفَجْر
Allah, the Most High, descends each night to the lowest heaven when the last third of the night remains. He says,
"Is there anyone who is repenting so that I may accept his repentance?
Is there anyone seeking forgiveness, so that I may forgive him?
Is there anyone asking of Me, so that I may grant him his request?"
until Fajr begins.
Many of the scholars of Tafsir said that when the Prophet Ya`qub said to his sons;
سَوْفَ أَسْتَغْفِرُ لَكُمْ رَبِّيَ
I will ask my Lord for forgiveness for you (12;98), he delayed doing so until the hours before dawn.
Allah the Exalted and Most Honored said,
وَفِي أَمْوَالِهِمْ حَقٌّ لِّلسَّايِلِ وَالْمَحْرُومِ