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.