For stacked rocks, Glass than Sand.
If you put rocks on the sand, then critters/fish/water movement can wash the sand out and then you get a rock slide.
Place the rocks , or got good Aqua scope , need some explanation :
# 1 u need good water flow, all over , every corner, why ....?
Detritus is # 1 responsible for PO4 and Nitrate .
You need access to clean sand, remove ( dead fish, crabs, snails etc)
You need room to siphon the sand, blow (water around) the precipitation all around your rocks.
# 2 good Aqua scope help to move water around , bring food and O2 , eliminate dead spots, more healthy system.
I place my largest rocks on the bottom glass first then sand as well. As far as the back glass, I wouldn't rest the rocks on it too much. It restricts flow behind the rocks and paves the way for things to build up back there. What I did was angle the rocks so that only a point of the rock would be resting on the glass. This would give me enough stability that I could stack the rocks higher as well as give me a little bit of room behind the rockwork for the fish to swim in and out of. Lots of crevices and caves are always appreciated by fish.