Clever and practical as expanding foam can be, there are issues over the fumes which are continually discharged if the foam is not sealed.
There are of course concerns about the chemicals in all manner of synthetic building and furniture products used in the home and the fumes which are constantly emitted from them. Some people appear to be more sensitive than others.
Having had some involvement with the foam materials as they were being developed and knowing people closely involved in their development and also being aware of those people's subsequent health issues, I would be very careful when considering using, working and living in close proximity to those materials.