Is the batting cotton or polyester? Polyester batting kind of melts when you put spray glue on it. But cotton batting would be OK.
Also, do you want that glue next to a baby? If you read the can, the glue comes out with dry cleaning, not regular laundering.
You could always use washable glue stick around the edges. Or machine baste them together.