I believe that it needs a backer to be sprayed against. Like your garage wall with the open studs. The foam would be sprayed between the studs and it expands. It can be trimmed down to the level of the studs after taht so you can cover it with drywall. if the rafters are open, it won't have anything to adhear to unless you are talking about your roof rafters.