Measure the distance between the inside edges of your attic rafter boards. This spacing should be consistent throughout the attic ceiling, with the possible exception of the rafters at either end of the attic ceiling.
Measure and cut a 3-foot long strip of rigid foam insulation that's as wide as the distance measured in the first step. Make your cut with a utility knife, guided by a straightedge.
Apply construction adhesive to the back side of the panel and place it between the rafters at the low side of the attic ceiling. Hold the panel until it is firmly attached.
Cut and apply panels until you've covered the space between the rafters all the way to the crown of the ceiling. Note that the length of your last piece will need to be measured to ensure that it fits.
Continue cutting and applying panel pieces until all the exposed ceiling board is covered.
Place vinyl tape over the seams between the pieces of foam panel.
Apply a bead of caulk along the edges of the foam panels to fill any space between the panels and the ceiling rafters.