Jonathan
We had the same problem with our little one in our Amara 500/5.
We bought a Tomy bedguard from argos which worked well with our daughter she slept on one of the rear benches of the rear dinette, she then progressed up onto the bunk that can be put up over the rear double, end of last season we put our son on the same side bunk, within 5 mins he had figured out how to climb out of a small gap, 2 mins later he crashed out over the top, luckally onto cushions and a pop-up laundry basket full of towels. This season will consist of the two of them sleeping of the made up rear double.
Towsure a few years ago sold a bunk kit simalar to what lorry drivers use to their top bunks, its no longer available.
I suggest you look at making your own barrier by using net curtains and a couple of brush handles threaded through hems at both ends of the curtain, place one end under the bunk mattress against the side of the caravan and attach the other end onto cup hooks or snap fastners underneath the top bunk.
Hope this helps sorry 4 the spelling.
Alex