Rain fell upon the people during the time of the Prophet ﷺ, so the Prophet ﷺ said, "Some of the people have risen this morning grateful, and others ungrateful. Some said, 'This is the mercy of Allah,' while others said, 'The prediction of such-and-such star has come true.'"Then this verse was revealed, "So I swear by the setting of the stars" until it reached "and you make your provision that you deny [Him]" [Waqiah 56:75–82].
مطر الناس على عهد النبي ﷺ، فقال النبي ﷺ: أصبح من الناس شاكر، ومنهم كافر، هذه رحمة الله، وقال بعضهم: لقد صدق نوء كذا وكذا فنزلت هذه الآية: {فلا أقسم بمواقع النجوم} حتي بلغ: {وتجعلون رزقكم أنكم تكذبون}.
Muslim narrated it in the Book of Faith (73) from Abbas bin Abdul-Azim Anbari, who said, "Nadr bin Muhammad narrated to us, Ikrima, who is Ibn Ammar, narrated to us, Abu Zumayl narrated to us, Ibn Abbas narrated to me," and he related it.