The World Federation One Stop Fiqh

Ruling 1076

It is unlawful to perform sajdah for any being other than Allah. Some people place their forehead on the ground in front of the graves of the Imams (ʿA); if they do this for offering thanks to Allah, there is no problem; otherwise, it is problematic [i.e. based on obligatory precaution, it must not be done].