Yes, you can. It is very important to remember is that paint will change the feel and texture of fabric. Also depending on the flexibility of the foam, hairline cracks might appear. The more flexible the foam, the more movement there will be.  The amount of paint needed will depend on the absorbency of the foam and fabric. More or less 1 L per 2 squares are required on fabric, but it can differ.

Steps to follow:

Evenly spray the fabric with water. Don’t dilute the paint and evenly and thinly paint a first coat of paint. Wait for first coat to be hand dry (meaning if you touch the paint there is no paint coming off) then apply a second coat of paint. In some instances, even four coats can be required. The number of coats needed depends on absorbency of fabric and foam.

No sealing or glaze is needed once paintwork is complete.
We ALWAYS suggest TO TEST FIRST to see if you like the effect and different texture caused by paint on a fabric and only then continue.