Sayyiduna Anas bin Malik (may Allah be pleased with him) reports that the Prophet (peace and blessings be upon him) said: "Whoever stands guard for one night on the seashore, that is more excellent than his worshipping in his own home for a thousand years, (such years) that a year is three hundred and sixty days and every day is a thousand years." (Allamah al-Haythami says:) I say:
Ibn Majah recorded it, except that he did not record the words: "on the seashore."
Abu Ya'la recorded it; its chain contains Sa'id bin Khalid bin Abi Tawil al-Qurashi, who is da'if (weak). Although Ibn Hibban declared him thiqah (trustworthy), he said in his book al-Du'afa': It is not permissible to use him as evidence.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الجهاد / 9497