All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
There is no objection to wearing socks while sleeping as there is no evidence that prohibits that. Moreover, saying that Angels do not enter a home where someone wearing socks is sleeping is not true as there is no evidence for it.
However, the Maaliki scholars dislike that the person wears socks and sleeps in them just to make sure that he could, when performing ablution later on, wipe on them instead of washing one's feet. They believe that the person who wears socks just for the purpose of ablution is not permitted to wipe on them. He should rather wash his feet in ablution.
Allah knows best.