It is narrated from Hazrat Aisha (may Allah be pleased with her) that the Prophet (peace and blessings be upon him) used to pray for the Muslims buried in Jannat al-Baqi. Hazrat Aisha (may Allah be pleased with her) asked the Prophet (peace and blessings be upon him) about this, so the Prophet (peace and blessings be upon him) said: I have been commanded to pray for them.
Hadith Referenceمسند احمد / مسند النساء / 26148
Hadith Gradingحکم دارالسلام:حديث حسن، وهذا إسناد ضعيف لانقطاعه لأن أبا بكر لم يسمع من عائشة