Rafters support the weight of the roof and any rain or snow that falls on it.
How to repair sagging roof rafters.
Ceiling joists are placed at the ends of the rafters to keep the rafters from spreading out and sagging.
When considering what to do about sags in a roof start by noticing if the sag is in sheathing between rafters page top photo0 or sagging along the length of the rafters.
This article describes a diy repair project using a site built spreader to straighten sagged roof rafters and decking.
Roof rafter decking sagging.
Realignment of the rafters may solve the sagging problem.