I took a 6X10 cargo trailer with an added 6" so my full 6ft1in frame could stand in it.
I came up with plans for a bed first. The bed had to be convertible just in case I wanted to get it out of the way to use this to haul some "stuff".
I used 1/2" plywood as to keep it light.
It is 76" long so a queen size mattress will fit nicely. Since the inside of the trailer is 68" wide I made the bed this width. This will allow for some added space.
Piano hinges are used to keep it compact (sorry no CAD pics just the real thing)
Buying thr trailer

Side door included

Bed complete (Storage spaces are 24"X17" to allow plastic crate storage

To show the hinges and how it will be compact

Side supports (Oak freebie Home Depot

Right hand section folds out of the way for quick egress

Made sure the right hand hinge was directly in the middle of the supporting board. This takes the weight off the hinge.

Another hinge view
Flooring done (rubber diamond plate from Costco). All one piece so there is no seams.

Bed folded out of the way. Might have to re-think the "stored" support system. Trying to keep it simple.

This is it so far.
This weekend I will tackle some of the electrical and wiring. It goes in the shop Monday AM for side door window and door latch.
I made sure to lock the cargo bar back to the wall so I don't get locked in. I too have some jokesters I tend to wheel with.
Feel free to throw any constructive criticism. I take all wisdom I can.