I started out because my (back then) cat liked to play with my toes using his claws which was painful and disturbing. So i decided to start wearing thick socks to not feel anything like this anymore during sleep time and it worked (tho the cat still played with my toes).
Now i don't have a cat for several years, but i'm still wearing socks to sleep (not because of the benefit mentioned, but because i'm so used to it)