Well, legos are safe for aquarium use. And silicone is too, they use it to bond the sides of the tank.... and the substrate is obviously safe. So I would say yes, just be sure the silicone is completely dry before putting it in.
But I'm not too sure how it would work out... the substrate might slide down the sides of your castles and such before it dries... maybe let the silicone set momentarily, before putting the substrate on it.
But I'm not too sure how it would work out... the substrate might slide down the sides of your castles and such before it dries... maybe let the silicone set momentarily, before putting the substrate on it.