I think this is already possible if you type "/doze" on top of a bed then you lie down using the same animation as inside the inn. Then logout ^^