Sahih al-Bukhari, Book 65, Hadith 4862 (In-Book)

Narrated Ibn `Abbas: The Prophet performed a prostration when he finished reciting Surat-an-Najm, and all the Muslims and pagans and Jinns and human beings prostrated along with him.

حَدَّثَنَا أَبُو مَعْمَرٍ، حَدَّثَنَا عَبْدُ الْوَارِثِ، حَدَّثَنَا أَيُّوبُ، عَنْ عِكْرِمَةَ، عَنِ ابْنِ عَبَّاسٍ ـ رضى الله عنهما ـ قَالَ سَجَدَ النَّبِيُّ صلى الله عليه وسلم بِالنَّجْمِ وَسَجَدَ مَعَهُ الْمُسْلِمُونَ وَالْمُشْرِكُونَ وَالْجِنُّ وَالإِنْسُ‏.‏ تَابَعَهُ ابْنُ طَهْمَانَ عَنْ أَيُّوبَ‏.‏ وَلَمْ يَذْكُرِ ابْنُ عُلَيَّةَ ابْنَ عَبَّاسٍ‏.‏

sunnah.com