somebody’s mind is wandering
From Longman Dictionary of Contemporary Englishsomebody’s mind is wanderingsomebody’s mind is wanderingMENTALLY ILLused to say that someone has become unable to think clearly, especially because they are old → wanderExamples from the Corpussomebody’s mind is wandering• My mind is wandering, as Isabel has said, I forget things.• Paul finds his mind is wandering, thinking about the poll tax program again.