Wearing socks while sleeping can increase the risk of poor hygiene. If your socks are too light, not clean or made of unbreathable fabric, it increases your chances of infection and odours.
Choose socks that are made of cotton or bamboo and ensure you wear a fresh pair before going to bed.