It protects from bad dreams (and the Sheidim who cause them).
A few weeks ago I was so tired that I fell asleep w/o saying KSA”H. About an hour later, I had a dream that my wife was pounding in my eyes. I woke up shortly after that and realized that I had not said KSA”H. I said it and slept well from then on.
I say all 3 paragraphs every night with the kavana that I fulfill the night time K”Sh (later z’man al pi Rabainu Tam). At that point I usually think about when I said K”Sh at Maariv. Sometimes, I realize that I hadn’t said it earlier because something came up and I missed minyan.
A part of the tefila of hamapil is that we tell Hashem that the reason we are going to sleep is only so that we can be refreshed to serve Hashem better tomorrow, thereby turning our sleep into a mitzva.