I hear that temperature effects still affect offline players and can possibly harm them. So maybe place a few fireplaces around the player and turn them on until they die of heatstroke?
Or maybe lure an aggressive monster to them? As far as I understand, players can still be eaten by the monster of Caerbannog while logged out.
Or just build a very tall tower around them, with the only exit on the top. Then cover the outer walls with no-climb fencing so that when they try to climb out they’ll fall to their deaths. That should teach them to go to sleep only in safe areas.
Of course, the first thing I’d suggest is to have patience and understanding with your fellow players. Especially new players may not consider what happens when they log out, so it’s only fair not to punish them too harshly for their inexperience. But once it becomes reasonably certain that they’re not going to come back any time soon, use whatever means necessary to get them off your lawn.