If you sleep while wearing socks, your mind will think it's daytime, and you won't be able to sleep.
「靴下付けたままだと、脳が日中と勘違いし、不眠になる」は英語で「If you sleep while wearing socks, your mind will think it's daytime, and you won't be able to sleep.」です。「勘違い」 は「misunderstand」でも言えます。「~まま、~ぱなし」は英語で「while ~」です。
電気付いたままだと、脳が日中と勘違いし、不眠になります。
If you sleep with the lights on, your mind will think it's day time, and you won't be able to sleep.
If you go to sleep with your socks on, your brain thinks it's still daytime, so you might not have a good sleep.
この場合、次のような言い方ができますよ。
ーIf you go to sleep with your socks on, your brain thinks it's still daytime, so you might not have a good sleep.
「靴下を履いて寝ると、脳がまだ日中だと思って不眠になる」
to sleep with one's socks on で「靴下を履いて寝る」
ご参考まで!