It is narrated from Amir: I asked Sayyiduna Alqamah (may Allah have mercy on him): Was Ibn Mas'ud (may Allah be pleased with him) with the Messenger of Allah (peace and blessings be upon him) on the "Night of the Jinn"? He said: I asked Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) this very question: Was any of you present with the Messenger of Allah (peace and blessings be upon him) on the "Night of the Jinn"? He said: No; rather, what happened was that one night we were with the Messenger of Allah (peace and blessings be upon him) and found him missing. Then we searched for him (peace and blessings be upon him) in the valleys and mountain passes. We thought: Perhaps he has been carried away (by the jinn), or he has been killed treacherously. We spent that night in great distress. When morning came, he (peace and blessings be upon him) came from the direction of (the cave of) Hira. We said: O Messenger of Allah! We found you missing, so we searched for you a great deal but could not find you. All of us spent the night in great distress. He (peace and blessings be upon him) said: "A person from among the jinn came to me, so I went with him and recited the Qur'an to them." Then he (peace and blessings be upon him) took us along and showed us their traces and the traces of their fires. They (the jinn) had asked him for provision, and he (peace and blessings be upon him) said: "Every bone over which the name of Allah has been mentioned will fall into your hands as full of meat as it can be, and every piece of dung is fodder for your animals." Then the Messenger of Allah (peace and blessings be upon him) said: "Do not clean yourselves (istinja) with these two (bone and dung), for they are the food of your (jinn) brothers."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 29