Sleeping with versus without socks:
A. The Halachic issue of removing the socks and revealing the feet:
Communities of people that never reveal the feet: (In those areas that it is not common to ever walk with revealed feet, even in the summer, they must be careful to always have the feet covered. Thus, when removing the socks prior to going to sleep one is to first cover his feet with the blanket and remove them under the blanket. Likewise, when putting on socks after awakening one is to put them on little by little under the blanket in order not to reveal it at all. This law applies throughout the day or night whenever he is switching socks.)
Communities that people walk without socks: In areas that it is common to walk without socks, then the feet are not considered a normally covered area and it is not necessary to leave them constantly covered.
Practically today may one uncover his feet? Practically, today it is not necessary to constantly cover the feet. This especially applies in a case that one is in pain in leaving his socks on. Nevertheless there are Chassidim that are stringent in this matter even today, and they change their socks under the covers, and never reveal their feet.
B. The custom of some to be particular to always remove socks and uncover their feet during sleep:
Some state, based on a ruling in Shulchan Aruch Harav, that it is forbidden to sleep with socks [or with the feet covered under a blanket]. Practically, it is the custom of many pious and meticulous Jews to be particular to sleep without socks and with the feet out of the blanket. It is told in the name of the Alter Rebbe that sleeping with socks can lead to lack of memory [see story below].
A Maaseh Shehaya
Sleeping without socks:
The following story was related by Rav Chaim Mordechai Perlow: I heard from the Mashpia, Rav Shmuel Gronam Estherman, that the Chassid Reb Michal of Optzuk studied in his youth many books of philosophy. In his later years he complained to the Alter Rebbe that the ideas which he read disturb his thoughts and perturb him. The Alter Rebbe told him: “You should sleep with socks, as this matter causes forgetfulness. Consequently, you will forget the ideas you learned from the philosophy books.”
In today’s times, it is permitted for one to remove his socks and sleep with uncovered feet. Furthermore, some are particular to always remove their socks and uncover their feet due to the belief that sleeping with socks can cause memory loss, or due to that sleeping with covered feet can cause nocturnal emission to a man. On the other hand, some are particular to sleep with socks or at least sleep with their feet always under the covers in order not to reveal the feet. Practically, one may choose as he sees fit, is from the letter of the law it is permitted for one to sleep with or without socks.
 Based on Admur Basra 2:2; Kama 2:9; 4:18; 56:17; 75:1; 91:5; 128:4; 619:18
 Admur Basra 2:2 in parentheses; M”B 2:1; However see Igros Moshe Yoreh Deah 3:47 for analysis on opinion of M”B
 Admur 75:1
Ruling of Kama: In Admur Kama 2:9 Admur rules [without parentheses] that one may not walk barefoot, and one who does so the Sages said is considered excommunicated from G-d. This is based on Rama 2:6. Likewise in 4:18 Admur lists the feet as one of the areas that require washing of hands when touched, and seemingly this is because the feet are considered a normally covered area. However, in 75:1; 56:17; 91:5; 128:44; 619:18 Admur rules it is permitted to reveal the feet. This is clearly ruled in 75:1 in which Admur writes that the feet are considered the revealed area of a man (in areas that people walk without socks). The explanation to this apparent contradiction is as follows: In areas that it is common to walk without socks, such as with slippers or sandals, then the feet are not considered a normally covered area and hence may be revealed. [Admur 75:1] Nevertheless even in such areas one may not walk barefoot [Admur 2:9] unless it is common to walk barefoot in those areas. [Admur 91:5] Although even in such a case it is proper to wear shoes. [Igros Moshe 3:47; This is also implied from the fact in Kama Admur seems to hold that people would walk barefoot at times and hence he rules in 4:21 that one is required to wash his feet daily. See Ketzos Hashulchan 2 footnote 25 in name of Mishneh Berurah 260:4 and Peri Megadim; Ketzos Hashulchan supplements page 82] As for why in 4:18 Admur rules the touching of the feet requires washing the Kaf Hachaim 4:73 explains that according to the Mekubalim the evil spirit which resides on the feet is very strong and does not move from its place even after being washed. [Kaf Hachaim in name of Yifei Laleiv 1:22 and Mor Uketzia 4; Rav Poalim 2:4] Thus perhaps its requirement of washing is irrelevant of whether it is considered a normally covered area.
 Aruch Hashulchan 2:1; Piskeiy Teshuvos 2:1; as it is common to walk in slippers, without socks, inside one’s house even when one has company. [see Igros Moshe Yoreh Deah 3:47]
 Igros Moshe Yoreh Deah 3:47
 Shulchan Hatahor “Tznius” chapter 4; This was the ruling of Harav Avraham Hirsh Hakohen, father of Rav Asher Lemel Hakohen, Rav of Anash Beitar Ilit.
 Chakal Yitzchak Mamar 7:3 [Yitzchak Issac of Spinka, murdered in Aushwitz Al Kiddush Hashem. HY”D]
 See Admur 619:18 based on Shelah and Elya Raba 619:11 that on the night of Yom Kippur one is to sleep with his feet uncovered in order to diminish the heat and prevent improper stimulation. It is told that the Rebbe Rashab gave someone similar instructions, to sleep without socks, as a Tikkun for nocturnal emission. [Otzar Minhagei Chabad Yom Kippur 176]
 Based on 619:18 the issue is not necessarily the socks but the fact the feet are covered.
 Brought in Piskeiy Teshuvos 2 footnote 4
 Perhaps the reason for this is due to that nocturnal emission causes forgetfulness. [See Tanya Igeres Hateshuvah 9 [blemishes the mind]; Mamarim Haketzarim p. 359; Tocheches Chaim [Falagi] p. 6 in name of Ramak; See Igros Kodesh 16:272 that acting with modesty strengthens the memory]
 Chassidim Harishonim 1:92