Bedtime Shema

Question: For those of you who say Shema every night before bed, when do you say it? Right when you get into bed and put your head down? Or later when you feel like you’re about to fall asleep? I always wonder because I know that it is supposed to be the last thing that you do before going to sleep, but sometimes while laying there, I remember things, and I have to pick up my phone and write them down, or I end up going to the washroom again. sorry if this is a silly question lol I’m just curious. Answer: In the Gemara, on 4b, we learn that one should recite the Shema as close as possible to lying down and going to sleep. However, while it might be easy to say the Shema just before getting into bed, many people are unable to fall asleep quickly, and their minds may wander, or they might get out of bed to do other things. You cannot predict these kinds of things. Sometimes you might fall asleep quickly, and sometimes not. Therefore, saying the Shema just before you get into bed would fulfill the mitzvah, and the words of the Shema would be the last things on your lips before sleep. On the other hand, if you are a person who routinely does not fall asleep quickly and often gets out of bed before actual sleep, you could wait and say the Shema later at some point, however, since we have little control over when we actually fall asleep, in order to be sure that you do say the Shema (and not forget it), you should just say it just before getting into bed.