All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Permissible matters turn into acts of worship by means of the intention. That is, when one eats, drinks, sleeps, or rests with the intention of gaining strength for obeying Allah, The Exalted, then all these acts turn into acts of worship. It is authentically reported that the Prophet, sallallaahu ‘alayhi wa sallam, said: "'…and in man’s sexual intercourse (with his wife) there is a charity.' They (the Companions) said: 'O Messenger of Allah, is there a reward for him who satisfies his sexual desire among us?' He said: 'Tell me, if he were to satisfy it unlawfully, would it not be a sin on his part? Similarly, if he were to satisfy it lawfully, he would be rewarded.'" [Muslim]
When a person evokes the intention of gaining strength for obeying Allah, The Exalted as he starts eating, drinking, or the like, and then he forgets that intention as he engages in his action and it totally slips out of his mind, it appears that there is nothing wrong with that. This is analogical to the ruling of Istis-haab (presumption of continuity) of the intention in acts of worship where the intention is a condition for the validity given the hardship involved in Istis'haab.
The prominent scholar Muhammad ‘Ulaysh said in Minah Al-Jaleel, when he spoke about the intention in the prayer:
"If the intention is no longer present in his heart and he forgets it after having harbored it when he recited the Takbeer of Ihraam, due to his heart's distraction with another matter, then his prayer is not invalidated because of such forgetfulness, and the actions he performed while he was unmindful of the intention are valid given the hardship involved in the continuity of harboring the intention throughout the performance of the prayer." [End of quote]
In the Fataawa of Shaykh Ibn ‘Uthaymeen there is an answer to a question on the principle of Istis'haab of the intention during ablution:
"Our advice to you is to let you know that Istis'haab basically means that you do not intend to interrupt the ablution. It does not mean that you should have the intention present in your mind throughout the ablution. So, forgetting the intention or being unmindful of it does not affect the validity of the ablution, since Istis'haab means that you do not intend to interrupt the act of worship. If, for example, you proceeded with the ablution till you washed your head or left arm, and then you became doubtful as to whether or not you had the intention present in your mind uninterruptedly, then the basic assumption is that you had it. Hence, you are not required to repeat the ablution." [End of quote]
Allah Knows best.