Sayyiduna Uqbah bin Amir (may Allah be pleased with him) narrates from the Messenger of Allah (peace and blessings be upon him) that he (peace and blessings be upon him) said: "When a servant purifies himself and then comes to the mosque, attending carefully to the prayer, ten good deeds are written for him for every step he takes towards the mosque; the one who sits there waiting for the prayer is like the qanit (one standing in devout worship); and from the time he leaves his house until he returns, he is recorded among those who pray."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 14913