Great stuff foam works really well for that type of thing too, and might be easier to get it to secure than using styrofoam.
You will want to embed gravel or sand into the great stuff before it dries... it is nearly impossible to get loose substrate to stay on top of any kind of hill in a tank... eventually it all just levels out.