The Messenger of Allah ﷺ visited his mother's grave and wept and cause those around him to weep. The Messenger of Allah ﷺ then said: I asked my Lord's permission to pray for forgiveness for her, but I was not allowed. I then asked His permission to visit her grave, and I was allowed. So visit graves, for they make one mindful of death. (Using translation from Abū Dāʾūd 3234)
زَارَ رَسُولُ اللَّهِ ﷺ قَبْرَ أُمِّهِ فَبَكَى وَأَبْكَى مَنْ حَوْلَهُ ثُمَّ قَالَ «اسْتَأْذَنْتُ رَبِّي أَنْ أَزُورَ قَبْرَهَا فَأَذِنَ لِي وَاسْتَأْذَنْتُهُ أَنْ أَسْتَغْفِرَ لَهَا فَلَمْ يُؤْذَنْ لِي فَزُورُوا الْقُبُورَ فَإِنَّهَا تُذَكِّرُ الْمَوْتُ» وَهَذَا الْحَدِيثُ صَحِيحٌ عَلَى شَرْطِ مُسْلِمٍ وَلَمْ يُخَرِّجَاهُ