He reported God’s messenger as saying, “Supplicate God when you are assured of being answered, and know that God does not answer a supplication which comes from a careless and inattentive heart.”
Tirmidhi transmitted it, saying this is a gharib tradition.