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.
Actually, there is no relationship between eyesight and wearing socks while sleeping. I can relate to your concern over your vision, but sometimes you have to take it easy. I can assure you the answer is definitely no. Just pay more attention to your eyes, by the way, being much too nervous will somehow affect your health, including your eyesight.
Actually there is no exact saying about the bad effect for the eyesight when you wear the socks to sleep. Wearing the socks may make you feel warm when you sleep. This is a good life style. And there may be no relationship between the wearing socks while sleeping and the eyesight. You may ask the doctor whether there is such thing.