In our old van my husband made something out of hardboard and cabinet hinges, which wasnt pretty but worked a treat, in our new van, we bought 2 wooden bed guards from ikea, and attached one on top of the other, which made it too high for my monkey boy to climb over. I tried a Tomy bed guard first but it didn't fit as the bed is too narrow.
Actually, we have two of these. In our 6 person tent they fit perfectly. Our whole family sleeps (me, my husband and two daughters) in these beds. No squeaks, no maintenance, easy unfolding and folding back.
Many years ago, when our kids were young, I made a bunk-side using dowelling for bars and a piece of inch-square wood top and bottom. Neither of our girls ever "escaped" from it. Even their kids are far too old for cots these days.
Amazing family weekend with old steam engines, classic car displays, market stalls, and full catering and bar. And camping on site - Save £25 by booking in advance.