Jami` at-Tirmidhi, Book 47, Hadith 3567 (In-Book)

Narrated Ash-Sha'bi: that 'Alqamah said: "I said to Ibn Mas'ud, may Allah be pleased with him: 'Did any of you accompany the Prophet on the Night of the Jinn?' He said: 'None of us accompanied him. One night, while he was in Makkah, we could not find him. We said: "He has been murdered [or] snatched, what has happened to him?" So we spent the worst night a people could spend until the morning' or 'it was about dawn when we saw him coming from the direction of Hira.' He said: 'They told him about what they had went through.'" "So he said: 'Someone from the Jinn came to invite me, so I went to them to recite for them.' He said: "So we went and saw their tracks and the traces of their camp fire.'" Ash-Sha'bi said: "They asked him about their provisions - and they were Jinns of Mesopotamia - so he said: 'Every bone upon which Allah's name has not been mentioned, that falls into your hands, and every dropping of dung is fodder for your beasts.'" So the Messenger of Allah said: "Do not perform Istinja with them for indeed they are provisions for your brothers among the Jinns."

حَدَّثَنَا عَلِيُّ بْنُ حُجْرٍ، أَخْبَرَنَا إِسْمَاعِيلُ بْنُ إِبْرَاهِيمَ، عَنْ دَاوُدَ، عَنِ الشَّعْبِيِّ، عَنْ عَلْقَمَةَ، قَالَ قُلْتُ لاِبْنِ مَسْعُودٍ رضى الله عنه هَلْ صَحِبَ النَّبِيَّ صلى الله عليه وسلم لَيْلَةَ الْجِنِّ مِنْكُمْ أَحَدٌ قَالَ مَا صَحِبَهُ مِنَّا أَحَدٌ وَلَكِنْ قَدِ افْتَقَدْنَاهُ ذَاتَ لَيْلَةٍ وَهُوَ بِمَكَّةَ فَقُلْنَا اغْتِيلَ أَوِ اسْتُطِيرَ مَا فُعِلَ بِهِ فَبِتْنَا بِشَرِّ لَيْلَةٍ بَاتَ بِهَا قَوْمٌ حَتَّى إِذَا أَصْبَحْنَا أَوْ كَانَ فِي وَجْهِ الصُّبْحِ إِذَا نَحْنُ بِهِ يَجِيءُ مِنْ قِبَلِ حِرَاءَ قَالَ فَذَكَرُوا لَهُ الَّذِي كَانُوا فِيهِ فَقَالَ ‏"‏ أَتَانِي دَاعِيَ الْجِنِّ فَأَتَيْتُهُمْ فَقَرَأْتُ عَلَيْهِمْ ‏"‏ ‏.‏ فَانْطَلَقَ فَأَرَانَا آثَارَهُمْ وَآثَارَ نِيرَانِهِمْ ‏.‏ قَالَ الشَّعْبِيُّ وَسَأَلُوهُ الزَّادَ وَكَانُوا مِنْ جِنِّ الْجَزِيرَةِ فَقَالَ ‏"‏ كُلُّ عَظْمٍ لَمْ يُذْكَرِ اسْمُ اللَّهِ عَلَيْهِ يَقَعُ فِي أَيْدِيكُمْ أَوْفَرَ مَا كَانَ لَحْمًا وَكُلُّ بَعْرَةٍ أَوْ رَوْثَةٍ عَلَفٌ لِدَوَابِّكُمْ ‏"‏ ‏.‏ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ فَلاَ تَسْتَنْجُوا بِهِمَا فَإِنَّهُمَا زَادُ إِخْوَانِكُمْ مِنَ الْجِنِّ ‏"‏ ‏.‏ قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ ‏.‏

sunnah.com