How would you join two twin beds?
What I would actually do: 

For sale: two twin beds. 

Want to buy or trade: one (double, queen, king) bed.

It's the simple solution, it's the right solution, it gets rid of the fundamental problem at a fundamental level.



Your pictures do not inform about the bedframes very well. Standard iron frames could be easily conjoined with hose clamps, or bolts, or u-bolts. Wooden frames can be screwed or bolted if you don't mind putting some holes in them.

At the upper level, I vaguely recall some sort of T-pad being sold for the center joint, and it helps immensely if you put on a mattress pad that fits over both beds, as well as sheets that do the same.