Sounds like it's an RV style trailer? If so, an easy solution I've used in our 5th wheel is to strap the tanks together with
cam straps and wedge them in place with a rubber trailer chock that's stored when we're in motion. A rack is probably overkill unless you're using it regularly for diving, plus it messes with your space for other loads.
Works best if you lay two straps down first in a lower compartment. Next lay the tanks perpendicular on top of them, then cinch. I also switch end orientation between tanks so they lock together better and have a consistent width when strapped. Otherwise, the boots will make one end wider. Move a long edge of a tank to a wall or something else solid, then wedge with the chock(s) and pack gear around the tanks. If you're worried about sliding, grab a cheap rubber mat and put it under the whole thing.
With all that said, you may want to consider keeping them in the tow vehicle if the weight distribution makes more sense that way. A lot depends on your tow setup.
Happy Trails,
Lance