Reference: Fataawa li Ahlil-Mayyit – Question 33, Page 36
Liqaa. al-Baab al-Maftooh – Volume 7, Page 31
Question: With respect to men, is there a specific time [legislated] to visit the graves?
And [likewise] is there a specific time prohibited to visit the graves?
Response: There is no specific time [legislated] for visiting the graves. There is no harm in visiting [the graves] at any time during the day or night. And it has been authenticated that the Prophet (sal-Allaahu ‘alayhi wa sallam) visited [the graves] at night.