On the authority of Aboo Hurayrah (radiAllahu 'anhoo) that he said: The Messenger of Allah ('Allayhee Salat Wassallam) said: Surely, Allah the Exalted 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" (Surah Al-Mu`minoon 23: 51). and He said: ' O you who believe, eat of the good things that We gave you" (Surah Al-Baqarah 2: 172). He then made a mention of a person who travels widely, his hair dishevelled 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?
(Muslim #1015; at-Tirmidhi #2989; ad-Daaramee #2719)