You probably could use white glue, but it will take forever to dry on styrofoam because it can't soak in. Caulking, Liquid Nails for Foam, or a water-based contact cement might be a better choice. Just make sure the adhesive you choose is safe to use on foam.
The first and only time I attempted to use a grass mat, it tended to wrinkle and curl up on the edges as the adhesive dried. WS has a new, plastic-based mat which they claim can even be formed into hills, but I have not seen or tried to use one of them.