Jami` at-Tirmidhi, Book 6, Hadith 32 (Tirmidhi 575)

Ibn Abbas narrated:

"The Messenger of Allah prostrated for it - meaning (in Surat) An-Najm - and so did the Muslims, the idolaters, the Jinns, and the people."