The Apostle of Allah ﷺ visited the grave of his mother and he wept, and moved others around him to tears, and said: I sought permission from my Lord to beg forgiveness for her but it was not granted to me, and I sought permission to visit her grave and it was granted to me so visit the graves, for that makes you mindful of death. (Using translation from Muslim 976b)
زَارَ النَّبِيُّ ﷺ قَبْرَ أُمِّهِ فَبَكَى وَبَكَى مَنْ حَوْلَهُ فَقَالَ رَسُولُ اللهِ ﷺ اسْتَأْذَنْتُ رَبِّي فِي أَنْ أَسْتَغْفِرَ لَهَا فَلَمْ يُؤْذَنْ لِي وَاسْتَأْذَنْتُهُ فِي أَنْ أَزُورَ قَبْرَهَا فَأَذِنَ لِي فَزُورُوا الْقُبُورَ فَإِنَّهَا تُذَكِّرُ الْمَوْتَ