As mentioned, having guard dogs and guards posted in/outside of rooms is standard fair for nobles. An invisible pc is not automatically hidden, and still must make stealth checks. Likewise, I assume he would have locks on his doors/windows, and any sensible lord would keep the walls of his castle free from vines and other stuff to climb from the outside, or keep rotating rooms when sleeping. I don't think you need to outright stop their assassination attempts, but make them difficult.
Also, Magic user or not, if nobles keep getting regularly assassinated in their beds, word will get around. Each other minion would ideally start taking steps to keep it from happening, and likely the Sorcerer King would as well. He can't have all his underlings die on him. Low level spells like alarm are keep to buy from a spellcaster or provide for people, and rudimentary alarm systems/traps work wonders. For example, setting up a tripwire rings a bell when the door or windows are opened. I'd still keep it viable to attempt to sneak in, but make it realistic.
Also, if we are being strictly RAW, there is no "instant kill in sleep" move. Attacking a target while asleep is merely an advantage to hit and still requires an attack roll to hit. Even with a greatsword (which a warlock isn't likely to use), it'd only be 2d6+mod damage (potentially 4d6 if you'd allow it to be an autocrit). Even using a spell slot (which would be noisy and loud) he's not likely to 1-shot a higher level NPC at full health.
An assassin rogue *might* pull it off, but he is no warlock.