One Option at Amazon and I'm sure Babies/Us, WalMart etc have some on hand. Most of those have "legs" that poke under the mattress. Can you get them "under" the way your bunk is set up?
I was looking for some railing to keep things from falling from shelves. Found these at LOWES... I did notice they had taller ones that might work for the beds...