When the holy chassid, Reb Michael Apotzker was a young man, he studied various works of Jewish Philosophy.
Many years later, after he became a chossid, he regretted learning these works. He complained to the Alter Rebbe, Rabbi Shneur Zalman of Liadi, that philosophical concepts often enter his mind making it difficult for him to focus on serving G-d.
The Alter Rebbe suggested that he sleep in socks, as it is brought in sefarim that doing so makes one forget their learning.[1]
Reb Michael was positive that because he received a blessing from the Rebbe, he would only forget those things that he desired to forget.
(Likutei Sipurim, 79)
[1] Shmiras HaGuf VhaNefesh, 115:1