Woolgathering

Wool"gath`er*ing (?), a. Indulging in a vagrant or idle exercise of the imagination; roaming upon a fruitless quest; idly fanciful.

Wool"gath`er*ing, n. Indulgence in idle imagination; a foolish or useless pursuit or design.

His wits were a woolgathering, as they say.
Burton.