Mishkat al-Masabih 135
Jabir said:
We went out with God’s messenger to [the funeral of] Sa'd b. Mu'adh when he died. God’s messenger prayed over him, and when he was placed in his grave and the ground was levelled over him, God’s messenger extolled God and we did so also at great length. He then said, “God is most great," and we did the same. Someone asked him why he had extolled God and then said, “God is most great," to which he replied, “This upright servant’s grave had closed in on him, but finally God removed the pressure from him." 

Ahmad transmitted it.
عَن جَابر بن عبد الله قَالَ خَرَجْنَا مَعَ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِلَى سَعْدِ بْنِ مُعَاذٍ حِينَ توفّي قَالَ فَلَمَّا صَلَّى عَلَيْهِ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَوُضِعَ فِي قَبْرِهِ وَسُوِّيَ عَلَيْهِ سَبَّحَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَسَبَّحْنَا طَوِيلًا ثُمَّ كَبَّرَ فَكَبَّرْنَا فَقِيلَ يَا رَسُولَ اللَّهِ لِمَ سَبَّحَتْ ثُمَّ كَبَّرْتَ قَالَ: «لقد تضايق على هَذَا العَبْد الصَّالح قَبره حَتَّى فرجه الله عز وَجل عَنهُ» . رَوَاهُ أَحْمد