I used large folding picture hook eyelets to provide a fastening point for bungee cords. I fastened the eyelets with the existing screws in the upper shelf and the lower platform. They fold flat when not in use.
I think we have three vertical bungees on both the side and front bunks. The bungees are easy to stow in the upper shelf when the bunk is in use. The bungees have wire hooks that fit in the eyelet easily.
The rear bunk is less of an issue, but I think I added one eyelet anyway. The front bunk is a bit sloppy due to the inward slope; may add a couple of extra eyelets, particularly in front of the couch. We have difficulty folding the couch with the mattress flopping inward; note the metal couch frame can damage the bottom of the mattress from rubbing.
The whole mod was less than forty dollars.
Here is a picture of the type of eyelet we used; try for ones with a single hole.