Pullout bunk bed

I am wanting to make bunkbeds but I want to make them so that the bottom bunk pulls out, kind of like a drawer and makes a king size bed to where Ii can just pull the mattress from top bunk, if that makes sense. Just looking for ideas or suggestions.