No, it's a bug!
:@
The death
might have been a result of connection lag, but it's a Minecraft bug that this actually caused me to die, and another Minecraft bug that all my inventory wasn't dropped when it occurred (or disappeared before I could return).
I wasn't doing any mining, or anything remotely dangerous. I was just walking about.
Also, it's not possible to sleep during the day, so even if your suggestion wasn't annoyingly long-winded (having to click upto 90 times to transfer items), it won't work anyway.
EDITED: 11 Jun 2011 21:33 by BOUGHTONP