8646: What is the ruling on sahw (forgetfulness) in prayer?

What is the ruling on sahw (forgetfulness) in prayer when a person’s mind wanders without any intention on his part?

Praise be to Allaah.

When the time for prayer comes, the worshipper should
forget about all worldly matters so that he can focus his mind and his
thoughts on worshipping his Lord as much as he can. So when he purifies
himself and stands to pray, he stands humbly, reciting the Book of his
Lord or listening to it, pondering its meanings and the meanings of
the adhkaar he recites in his prayers. He should not give in to the
Shaytaan and his insinuating whispers; when the Shaytaan tries to distract
him, he tries harder to focus on his prayers, and seeks refuge with
Allaah from the accursed Shaytaan. It was narrated from Abu’l-‘Alaa’
ibn al-Shukhayr that ‘Uthmaan said, “O Messenger of Allaah, the Shaytaan
comes between me and my prayer and recitation.” He [the Prophet
(peace and blessings of Allaah be upon him) said: “That is a shaytaan
(devil) called Khanzab. If you feel him then seek refuge with Allaah
from him and spit drily to your left three times.” He ‘[Uthmaan] said:
I did that and Allaah kept him away from me.