Seeking Blessings from Graves
Is it permissible to stand or sit by a grave for supplication in favour of the deceased?
The purpose of the legitimate visitation to graves is to get a lesson, remember death and heed, not for seeking blessings from the buried.
When one enters a cemetery he should greet the dead saying: As-Salaamu Alaikum, O people of this place, believers and Muslims, and we will – if Allah wills – follow you. We ask Allah safety for ourselves and yourselves.
One may also recite other supplication in favour of the dead that are recommended by the Prophet (sallallaahu alaihi wa sallam).
But he should not ask the dead people to fulfil his needs, seek relief or benefit from them. Supplication alone is an act of worship which must be dedicated to Allah alone.
There is not harm however, in standing or sitting by the grave while supplicating, but not for seeking blessings or taking rest. Graveyards are not resting places or residential area for people to sit in.
It is legitimate to stand by the grave areas right after burial to supplicate in favour of the buried asking Allah to confirm him and forgive him. It is authentically reported that whenever the Prophet (sallallaahu alaihi wa sallam) buried a dead, he would stand by his grave and say: Ask Allah’s forgiveness for your brother, and ask him to make him give firm answers, for right now he is being questioned.
 Muslim no.975
 Abu Dawud no.3221, Al-Hakim 1:370 and Al-Bayhaqi 4:56
The Permanent Committee
Fatawa Islamiyah Vol. 1 Page 66, Dar-us-salam publications