I was hosting a game for a friend, I went to go out - knowing I would probably starve to death and come to pick up my items later.
I had my character lie down on a bed (upper floor up a ladder) in a small house we had found. When I starved to death, I could not find my inventory next to my tombstone indoors I thought this was a bug if dieing on a bed incase the world did not have my coordinates, just the item I was using (the bed). However I after realized all my inventory was on the roof! After building a ladder I was able to retrieve.
TLDR: When a character dies indoors, items are 'dropped from the sky' and will land on the roof X,Y,Z instead of the the characters Z position.