Rubber band them together or use a velcro strap, then just put them in your safe.
If you want something stack-able... use the plastic ammo boxes as shown above or a small range bag.
Questions...
1. How many magazines are we talking about here?
2. Are you storing them loaded or unloaded?
3. Are you shooting the 15-22 frequently, just every now and then, or daily?
4. How big is your safe?
5. 25 round magazines? 35 round magazines? 10 round magazines? Drum magazines? All of the above?
Another thing you could do is buy the tacticool22 ranger plates (or pop the floor plate off and insert a small loop of paracord) and put magnetic hooks on the wall of your safe... then simply hang them on the wall inside. When you're ready to hit the range, pull them and put them in your range bag.