O people, Allah is Good and He therefore, accepts only that which is good. And Allah commanded the believers as He commanded the Messengers by saying: "O Messengers, eat of the good things, and do good deeds; verily I am aware of what you do" (xxiii. 51). And He said: "O those who believe, eat of the good things that We gave you" (ii. 172). He then made a mention of a person who travels widely, his hair disheveled and covered with dust. He lifts his hand towards the sky (and thus makes the supplication): "O Lord, O Lord," whereas his diet is unlawful, his drink is unlawful, and his clothes are unlawful and his nourishment is unlawful. How can then his supplication be accepted? (Using translation from Muslim 1015)
قَالَ رَسُولُ اللهِ ﷺ إِنَّ اللهَ طَيِّبٌ لَا يَقْبَلُ إِلَّا الطَّيِّبَ وَإِنَّ اللهَ أَمَرَ الْمُؤْمِنِينَ بِمَا أَمَرَ بِهِ الْمُرْسَلِينَ قَالَ {يَا أَيُّهَا الرُّسُلُ كُلُوا مِنَ الطَّيِّبَاتِ وَاعْمَلُوا صَالِحًا إِنِّي بِمَا تَعْمَلُونَ عَلِيمٌ} [المؤمنون 51] وَقَالَ {يَا أَيُّهَا الَّذِينَ آمَنُوا كُلُوا مِنْ طَيِّبَاتِ مَا رَزَقْنَاكُمْ} [البقرة 172] ثُمَّ ذَكَرَ الرَّجُلُ يُطِيلُ السَّفَرَ أَشْعَثَ أَغْبَرَ يَمُدُّ يَدَيْهِ إِلَى السَّمَاءِ يَا رَبِّ يَا رَبِّ وَمَطْعَمُهُ حَرَامٌ وَمَشْرَبُهُ حَرَامٌ وَمَلْبَسُهُ حَرَامٌ وَقَدْ غُذِّيَ بِالْحَرَامِ فَأَنَّى يُسْتَجَابُ لَهُ