Cot That Turns Into Double Bed

You could easily place an old door behind the bed to create a low visual backrest.
Cot that turns into double bed. On sep 1 2019. He would easily. The backrest could be as simple as a wooden door. We have a double bed that i would like to turn into a massive cot for our 9 month old.
One way is to remove one side of the crib with a screwdriver and attach a premade guardrail in its place. A standard door is 80 inches tall which when placed on its side is only 5 inches wider than the 75 inch twin sized bed. If the guardrail is about 2 3 of the bed s length your child can get in and out of bed on their own while having a barrier to stop. Then center the bed under the cot.
The only thing i could think of was to fold it flat and mount to the wall. I would like to effectively have a cot style side rail and end rail which is say 1 meter tall just like a cot so that he cant climb over it he climbs over everything. There are walls along 2 sides so i need to blank off the other 2 sides. Visually this turns the bed sideways and into a daybed.
This would be of course after cleaning thoroughly.