It's safe to use but keep in mind that despite what many guides state, it takes months for this stuff to cure if you apply it in any expanded thickness of an inch (2.5 cm) or more. As it cures it gives off unsafe gases that are not good for animals, including amphibians. I usually apply expanding foam, let it "cure" for a week and then put holes in it with a tooth pick to help it cure. I generally don't use it for anything alive until a few weeks have passed.

As for applying the substrate to it, I highly recommend you let it cure first and then use brown silicone as a coating onto which you put the substrate. I tried doing what you're talking about, where you try to immediately press substrate into newly applied foam and I was never happy with the result - it looks very patchy and the substrate never really attaches to the foam that way.