We just used one of those mesh under mattress bed rails like this:
Image shamelessly leveraged from toysrus.ca
We then would jam it between the mattress and the wardrobe. Here's what our bunkhouse (kind of) looked like:
Image shamelessly leveraged from some online dealer
See how the wardrobe(s) went right up to the bunk on the right hand side of the image? By using those to support the bedrails (one top, one bottom) from falling down, we could make sure the kids didn't tumble out without having to worry about bolting the rails down or any other fresh holes.