As for the narrations found in the Sunnah regarding the good effects of the Ibaadaat (i.e. acts of worship) in the life of a Muslim, there is that great and precious advice of the noble Prophet (sallal laahu alayhi wasallam) which he gave to Ibn Abbaas (radiyallaahu anhuma), saying:

[احْفَظْ اللَّهَ يَحْفَظْكَ احْفَظْ اللَّهَ تَجِدْهُ تُجَاهَكَ ‘’Be mindful of Allah and He will protect you. Be mindful of Allah and you will find Him before you.’’ This hadeeth was reported by Imaam Tirmidhee (number 2516) and he graded it Hasan Saheeh. And in another wording of this hadeeth reported by Imaam Ahmad (Number 2803), the Prophet (sallal-laahu-alayhi-wasallam) said to Ibn Abbaas (radiyallaahu-anhumaa):

[احفظ الله تجده أمامك ، تعرف إلى الله في الرخاء يعرفك في الشدة] ‘’Be Mindful of Allaah, and you will find Him in front of you. Acknowledge Allaah in times of ease and prosperity, and He will acknowledge you in times of hardship.’’ This is the 19th hadeeth amongst the 40 ahaadeeth of Imaam Nawawi.

(Imaam) Ibn Rajab (rahimahullaah) made some precious comments on this hadeeth in Jaami-ul Uloom Wal Hikam; he said: The protection of Allaah for His slave is in two ways: (a) Protection of the person’s body, wealth, children and family; and (b) protection of his religion, so that he is safeguarded from those doubts that leads to misguidance and from forbidden desires, and thus he finds himself in a state of uprightness and steadfastness in his religious and worldly affairs. This is Allaah’s Protection for the one who is mindful of Him—the one who remains within the limits imposed by Allaah-by fulfilling Allaah’s commandments and keeping away from what Allaah has forbidden. Allaah rewards this person due to him being mindful of Allaah and reward is given in accordance with one’s actions. Indeed the statement of the Prophet (sallal-laahu-alayhi-wasallam): [يَحْفَظْكَ‘’He (Allaah) will protect you] is a reward from the good effects that are obtained as a result of righteous action, and reward is given in accordance with a person’s actions.

And as for the statement of the Prophet (sallal-laahu-alayhi-wasallam):

[احْفَظْ اللَّهَ تَجِدْهُ تُجَاهَكَ- ‘’Be mindful of Allah and you will find Him before you]; meaning: you will find Allaah in front of you- Allaah will guard and protect you, and He will protect you from every evil.

And as for the statement of the Prophet (sallal-laahu-alayhi-wasallam):

[تعرف إلى الله في الرخاء يعرفك في الشدة- Acknowledge Allaah in times of ease and prosperity, and He will acknowledge you in times of hardship]; meaning: if you remain upon obedience to Allaah and His Messenger in times of ease and wellbeing, then indeed Allaah will reward you by protecting you during times of severe hardships and during critical situations.

And what will shed more light on this is the story of the three people who were walking, so rain began to fall and they had to enter a cave in a mountain. A big rock rolled over and blocked the mouth of the cave and they were unable to come out; so it seemed as if they were in a grave whilst being alive. Then they reminded one another and remembered what will remove them from that severe hardship, and that was to recall some righteous actions they performed for the Sake of Allaah in times of ease and so that they can utilise those righteous actions as a means of Tawassul (i.e. to invoke Allaah with the best deed they performed in the past). So one of them invoked Allaah whilst mentioning the kind treatment he showed to his parents; the second invoked Allaah whilst mentioning his abandoning fornication for the sake of Allaah even though he was able to do so; and the third invoked Allaah whilst mentioning the incident when he fulfilled the rights of an employee who departed before collecting his wages. All of them invoked Allaah whilst mentioning a righteous action they had performed in times of ease, so Allaah caused the rock to move away and they came out of the cave. [1]

[Abridged and slightly paraphrased. Source: أثر العبادات في حياة المسلمpages: 17-20]

————————————————————————————————————

[1] Here is the text of the hadeeth about those three men

Narrated Ibn ‘Umar: The Prophet said, “While three persons were walking, rain began to fall and they had to enter a cave in a mountain. A big rock rolled over and blocked the mouth of the cave. They said to each other, ‘Invoke Allah with the best deed you have performed (so Allah might remove the rock)’. One of them said, ‘O Allah! My parents were old and I used to go out to graze (my animals). On my return I would milk (the animals) and take the milk in a vessel to my parents to drink. After they had drunk from it, I would give it to my children, family and wife. One day I was delayed and on my return I found my parents sleeping, and I disliked to wake them up. The children were crying at my feet (because of hunger). That state of affairs continued till it was dawn. O Allah! If You regard that I did it for Your sake, then remove this rock so that we may see the sky.’ So, the rock was moved a bit. The second said, ‘O Allah! You know that I was in love with a cousin of mine, like the deepest love a man may have for a woman, and she told me that I would not get my desire fulfilled unless I paid her one-hundred Dinars (gold pieces). So, I struggled for it till I gathered the desired amount, and when I sat in between her legs, she told me to be afraid of Allah, and asked me not to deflower her except rightfully (by marriage). So, I got up and left her. O Allah! If You regard that I did if for Your sake, kindly remove this rock.’ So, two-thirds of the rock was removed. Then the third man said, ‘O Allah! No doubt You know that once I employed a worker for one Faraq (three Sa’s) of millet, and when I wanted to pay him, he refused to take it, so I sowed it and from its yield I bought cows and a shepherd. After a time that man came and demanded his money. I said to him: Go to those cows and the shepherd and take them for they are for you. He asked me whether I was joking with him. I told him that I was not joking with him, and all that belonged to him. O Allah! If You regard that I did it sincerely for Your sake, then please remove the rock.’ So, the rock was removed completely from the mouth of the cave.” [See Saheeh Bukhaari. (Number: 2215)] and Saheeh Muslim (Number 2743)]