Amir reported,

I asked Alqama whether Ibn Masud had been present with the Messenger of Allah ﷺ on the night of the jinn.Alqama replied, "I asked Ibn Masud myself. I said, 'Did any of you accompany the Messenger of Allah ﷺ on the night of the jinn?'"Ibn Masud answered, "No, but we were with the Messenger of Allah ﷺ one night, and we lost track of him. We searched for him in the valleys and the mountain passes, and we said, 'He has been snatched away or assassinated.' So we spent the worst night a people could spend. When morning came, there he was, coming from the direction of Hira."We said, "Messenger of Allah, we lost you and searched for you but could not find you, so we spent the worst night a people could spend."He said, "A caller from the jinn came to me, so I went with him and recited the Quran to them."Then he took us along and showed us their traces and the traces of their fires. They had asked him for provisions, and he told them, "Every bone over which the name of Allah has been mentioned will come into your hands with more flesh on it than before, and every piece of dung will be fodder for your animals."The Messenger of Allah ﷺ then said, "So do not use these two things to clean yourselves after relieving yourselves, for they are the food of your brothers."

Azami 13620

Sahih

عن عامر قال

سألت علقمة هل كان ابن مسعود شهد مع رسول الله ﷺ ليلة الجن؟ قال: فقال علقمة: أنا سألت ابن مسعود، فقلت: هل شهد أحد منكم مع رسول الله ﷺ ليلة الجن؟ قال: لا ولكنا مع رسول الله ﷺ ذات ليلة، ففقدناه، فالتمسناه في الأودية والشعاب، فقلنا: استطير أو اغتيل قال: فبتنا بشر ليلة بات بها قوم، فلما أصبحنا إذا هو جاء من قبل حراء، قال: فقلنا: يا رسول الله، فقدناك، فطلبناك، فلم نجدك، فبتنا بشر ليلة بات بها قوم. فقال: أتاني داعى الجن، فذهبت معه، فقرأت عليهم (القرآن). قال: فانطلق بنا فأرانا آثارهم و آثار نيرانهم، وسألوه الزاد، فقال: لكم كل عظم ذكر اسم الله عليه يقع في أيديكم أوفر ما يكون لحما، وكل بعرة علف الدوابكم. فقال رسول الله ﷺ: فلا تستنجوا بهما فإنهما طعام إخوانكم.

الأعظمي 13620صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Tafsir of Surah Jinn
Section
His saying, "Say, 'It has been revealed to me that a group of jinn listened and said, "Indeed, we have heard a wondrous Quran. It guides to the right way, so we have believed in it, and we will never associate anyone with our Lord"'"
Numbering
Jami al-Kamil 13620 (2nd edition)
Azami 13620