I haven't figured out a pattern for the issue. It seems to do it - occasionally - whether plugged in or not. I tried an SMC reset but that didn't fix it.
There's something else as well, and it happened twice already so it appears to be a real issue.
It can resume from sleep apparently fine, allow entry to the password box, but refuse the password - even when typed perfectly carefully and accurately, as many times as I type it. It's surely the right password for the user as I only have one user.
Switching user changes the screen (using that screen turn animation) to an empty grey screen from which there's no coming back. It displays nothing and doesn't react to any input, the mouse cursor is not visible.
Leaving the laptop on, while in this state, will eventually cause it to reboot itself (with no user intervention).
This behaviour is new since Mavericks. It hasn't happened in the prior two years of ownership.