Acrylic-latex or silicone caulk is recommended for gaps that are not more than about 1/4″ in width. Typical applications of this product can be around the top plate and the seam between the ceiling and wall, or around recessed light fixtures and junction boxes. This can be purchased at most hardware stores for a nominal fee.
A 2-part expandable polyurethane foam is employed if the area to be sealed is wider than 1/4″, since caulk often can’t span gaps that large very efficiently, leaving voids or eventually dislodging. In these cases, a 2-part expandable foam is the best choice.
For details on ordering 2-part polyurethane foam kits, click here.
Be sure to follow proper safety procedures when using any type of caulk or foam product for attic sealing. As you will be working in a known confined space, insure that proper personal protection equipment (PPE) is worn and, when possible, use in a well-ventilated area.