קריאת שמע על המטה

What must be said? (The Shulchan Aruch says one thing, my siddur says something else)

The main thing is Shema and Hamapil. The rest is up to you.

Hamapil with Shem Umalchut, and three parshiot of Shema?

Hamapil with Shem Umalchut. First Perek of Shema.

Does ברכת המפיל have to be said right before you go to sleep?

When you’re getting ready for bed. Doesn’t have to be at the last minute.