Ibn Masood (رضي الله عنه) narrated that the Messenger of Allah ﷺ said: “A caller from among the jinn came to me, and I went with him and recited Quran to them.” Ibn Masood (رضي الله عنه) said that the Messenger of Allah ﷺ took them and showed them their footsteps and the traces of their fires. They had asked him for provision and he had prayed to Allah (سبحانه و تعالى) and told them: “You will have every bone over which the name of Allah (سبحانه و تعالى) has been mentioned; when it falls into your hands it will have plenty of meat on it. And all droppings are food for your animals.” Then the Messenger of Allah ﷺ said: “Do not use them (bones and dung) to clean yourselves after relieving yourselves, for they are the food of your brothers.” [Saheeh Muslim]
This hadith proves that the jinns eat and drink and that some among them are Muslims and listen to the Quran.
Just as man is forbidden to eat meat over which the name of Allah has not been mentioned, the believing (Muslim) jinn are also forbidden to eat those bones over which the name of Allah has not been mentioned. Such things are left for the devils to eat, who are the Kuffaar among the jinn.
The devils regard food as permissible if the name of Allah has not been mentioned over it. So say “Bismillah” when beginning to eat to prevent the devils from partaking of your food.
We should realize that if we are forbidden to spoil the food of the jinn, it is a more serious sin to spoil the food of man. We should not throw food away or waste it, but ensure that it reaches the hungry.
The fact that dung is the food of the animals of the jinn is not the only reason that we are not allowed to use it to clean ourselves. The Messenger of Allah ﷺ mentioned another reason too, as he stated clearly that dung is Rijs (filth). [Saheeh Bukhari]