Well, of course no. sleeping with your socks definitely has no affect on your eyesight. There is nothing to do with your eyesight, only if you are wearing the socks on your head and they cover your eyes. But on the other hand, you should know that wearing socks while sleeping actually can be bad for your health. As we know that socks accumulates a lot of bacteria from inside or shoes, so if you wear them in the bed, it can carry many bacteria in your bed. So you can be infected by them. Especially for someone who walks a lot with shoes off but socks on at home. It can be even dangerous. Besides, if you sleep at night with your covers over your head, you're creating a closed environment for the bacteria from your feet to swarm around the inside of the blanket. So in this way, it is not only bad for the eyes, but also can be harm to the lungs. Anyway, you should not wear them in the bed.