in any direction that his legs are willing to travel; aimlessly, without any particular direction
WHEREVER HIS LEGS CARRY HIM
Meaning of WHEREVER HIS LEGS CARRY HIM in English
Explanatory English dictionary bed edition. Толковый словарь английского языка Редакция bed. 2012