One should recite Aayatul Kursi before sleeping
عن أبي هريرة رضي الله عنه قال وكلني رسول الله صلى الله عليه وسلم بحفظ زكاة رمضان فأتاني آت فجعل يحثو من الطعام فأخذته وقلت والله لأرفعنك إلى رسول الله صلى الله عليه وسلم قال إني محتاج وعلي عيال ولي حاجة شديدة قال فخليت عنه فأصبحت فقال النبي صلى الله عليه وسلم يا أبا هريرة ما فعل أسيرك البارحة قال قلت يا رسول الله شكا حاجة شديدة وعيالا فرحمته فخليت سبيله قال أما إنه قد كذبك وسيعود فعرفت أنه سيعود لقول رسول الله صلى الله عليه وسلم إنه سيعود فرصدته فجاء يحثو من الطعام فأخذته فقلت لأرفعنك إلى رسول الله صلى الله عليه وسلم قال دعني فإني محتاج وعلي عيال لا أعود فرحمته فخليت سبيله فأصبحت فقال لي رسول الله صلى الله عليه وسلم يا أبا هريرة ما فعل أسيرك قلت يا رسول الله شكا حاجة شديدة وعيالا فرحمته فخليت سبيله قال أما إنه قد كذبك وسيعود فرصدته الثالثة فجاء يحثو من الطعام فأخذته فقلت لأرفعنك إلى رسول الله وهذا آخر ثلاث مرات أنك تزعم لا تعود ثم تعود قال دعني أعلمك كلمات ينفعك الله بها قلت ما هو قال إذا أويت إلى فراشك فاقرأ آية الكرسي {الله لا إله إلا هو الحي القيوم} حتى تختم الآية فإنك لن يزال عليك من الله حافظ ولا يقربنك شيطان حتى تصبح فخليت سبيله فأصبحت فقال لي رسول الله صلى الله عليه وسلم ما فعل أسيرك البارحة قلت يا رسول الله زعم أنه يعلمني كلمات ينفعني الله بها فخليت سبيله قال ما هي قلت قال لي إذا أويت إلى فراشك فاقرأ آية الكرسي من أولها حتى تختم الآية {الله لا إله إلا هو الحي القيوم} وقال لي لن يزال عليك من الله حافظ ولا يقربك شيطان حتى تصبح وكانوا أحرص شيء على الخير فقال النبي صلى الله عليه وسلم أما إنه قد صدقك وهو كذوب تعلم من تخاطب منذ ثلاث ليال يا أبا هريرة قال لا قال ذاك شيطان (بخاري رقم 2311)
Hadhrat Abu Hurayrah (Radhiallahu Anhu) reports: “On one occasion Rasulullah (Sallallahu Alaihi Wasallam) appointed me to protect and safeguard the zakaat wealth that was given in the month of Ramadhaan. One night a person came and began taking away some grain. I caught him and said to him ‘I take an oath on Allah, I will definitely report you to Rasulullah (Sallallahu Alaihi Wasallam).’ He replied: ‘I am a needy person, and I have a family to support, therefore I am taking this wealth due to my great need.’ Hadhrat Abu Hurayrah (Radhiallahu Anhu) (after listening to the man’s need) thus released him. The following morning Rasulullah (Sallallahu Alaihi Wasallam) addressed me saying: ‘O Abu Hurayrah, what transpired between yourself and your captive last night?’ I replied: ‘O Rasulullah (Sallallahu Alaihi Wasallam), he complained of being in great need and having a family to support, so I felt pity for him and released him. Rasulullah (Sallallahu Alaihi Wasallam) replied: ‘He has spoken lies to you, and he will return.’
I was sure that he will definitely return due to the statement of Rasulullah (Sallallahu Alaihi Wasallam), hence I waited for him. The following night he came and began taking away some grain. I apprehended him and said to him ‘I will definitely report you to Rasulullah (Sallallahu Alaihi Wasallam).’ He replied: ‘Allow me to go. I am a needy person, and I have a family to support, I won’t return in the future.’ Hadhrat Abu Hurayrah (Radhiallahu Anhu) (upon seeing his desperation) had mercy on him and released him. The next morning Rasulullah (Sallallahu Alaihi Wasallam) addressed me saying: ‘O Abu Hurayrah, what happened to your captive last night?’ I replied: ‘O Rasulullah (Sallallahu Alaihi Wasallam), he complained of being in constraints and having to fulfil the needs of his family, so I had mercy on him and released him. Rasulullah (Sallallahu Alaihi Wasallam) replied: ‘He has spoken lies to you, and he will return.’
So I awaited his arrival for the third time. The following night he returned and began taking away some grain. I took hold of him and said to him ‘This time I will definitely report you to Rasulullah (Sallallahu Alaihi Wasallam). This is the third time that you have returned whereas you previously claimed never to return, yet you are back. ’ He replied: ‘Please release me in exchange of me teaching you something through which Allah Ta’ala will cause you to benefit through it. I agreed, and he said: ‘When you retire to bed, then recite Aayatul Kursi, for an angel will be appointed to continuously protect you throughout the night, and till the morning no shaytaan can come close to you.’ I thus released him and allowed him to go.
The next morning Rasulullah (Sallallahu Alaihi Wasallam) addressed me saying: ‘O Abu Hurayrah, what happened to your captive last night?’ I replied: ‘O Rasulullah (Sallallahu Alaihi Wasallam), he told me that (in exchange of me letting him go) he will teach me certain words whereby Allah Ta’ala will cause me great benefit, hence I accepted and thus allowed him to go. Rasulullah (Sallallahu Alaihi Wasallam) asked: “What did he teach you?” I replied: He told me ‘When you retire to bed, then recite Aayatul Kursi.’ And he said: ‘an angel will be appointed to continuously protect you throughout the night, and till the morning no shaytaan can come close to you.’ -The narrator of the Hadith explains that Hadhrat Abu Hurayrah (Radhiallahu Anhu) accepted the deal as it is known that all the Sahaabah were most anxious in acquiring knowledge-. Rasulullah (Sallallahu Alaihi Wasallam) said to Hadhrat Abu Hurayrah (Radhiallahu Anhu): ‘Though he is the greatest liar, however on this occasion he has spoken the truth. O Abu Hurayrah, do you know who you have been conversing with for the last three nights?” Hadhrat Abu Hurayrah (Radhiallahu Anhu) replied in the negative. Rasulullah (Sallallahu Alaihi Wasallam) mentioned: “That was Shaytaan.”
Source: Ihyaauddeen.co.za