From Allah’s vast mercy to His slaves, He (swt) gives them a reward similar to the person who is praying, just for sitting in the Masjid and waiting for the next congregational prayer; furthermore, He (swt) makes His angels supplicate for them.
We must keep in mind that, as the Hadeeth informs us, certain conditions must be fulfilled if you are to achieve the aforesaid reward and honor. First, nothing other than the prayer should be preventing you from going back to your home or work or elsewhere. Second, for the angels to supplicate for both those who wait for the prayer anywhere in the Masjid and those who remain seated in the spot they prayed in. If you harm Muslim worshippers with speech or deed, or if you do something to nullify your state of purity (i.e., pass wind,etc.), you will not gain the reward of a person who waits for prayer, and the angels will not make the aforementioned supplication for you.
1) Related by Bukhaaree (176), Muslim (649), Ahmad (7382), An-Nassaaee (733), Abu Daawood (559), and Maalik (382). And the wording mentioned above is from Muslim’s narration of the Hadeeth