There are a lot of companies selling spray foam for roofs.
It sounds like a good idea. We all know insulation is a good thing.
Be aware folks, this is not a good option for trying to stop leaks or lowering your utilities.
The foam is never sprayed evenly and usually has sunken areas that hold water and debris.
Its sprayed over some vents and around others causing puddles that hold water.