wool gathering

Your wits are gone a woolgathering ; saying to an absent man, one in a reverie, or absorbed in thought.

The 1811 Dictionary of the Vulgar Tongue.