On the Boler
the poles extend above the bunk and welded onto the poles, about 8 inches down, was a loop. This caught a steel screw that was attached to plywood.
When my Grandkids were small and I was worried of them falling off the top. I cut a peice of 1/4 plywood to go along the front edge of the bed, between the matress and the tops of the poles.