Measure the distance between the rafters of the ceiling, starting at one side of the underside of the roof. Measure from the inside edges of the rafters.
Cut a piece of rigid foam insulation that matches the width you measured, using a utility knife and a straight edge. Make the piece of panel 3 feet long. This will be easy to hold up in place as you install it.
Place your construction adhesive into a caulking gun and apply it to the backside of the rigid foam panel. Place the panel on the underside of the roof deck and hold until it sticks in place.
Cut another 3-foot-long piece of panel and apply to the roof underside. Continue until you reach the crown of the roof. Measure the final piece for the correct length.
Continue applying panel segments until you've covered the underside of the roof. Fill the gaps between panels and the space between the panels and rafters with acrylic weatherstripping caulk.