From Sahih Bukhari (Hadith 5853):
Narrated Ibn `Abbas:The Prophet (ﷺ) said, "Whoever has no Izar (waist sheet), can wear trousers; and whoever has no sandals, can wear Khuffs (socks made from thick fabric or leather, but cut them short below the ankles)
Reference: Bukhari 5853