A flat roof with sagged joists allows rainwater to pool at the center, rather than draining toward the roof edges. This is a common problem and it affects nearly all the so-called flat roofs. Having an insufficient roof slope promotes standing pools of rainwater and this increases the likelihood of leakage as the roof becomes older.
Roof drains should be installed at each low point of the roof. Since the roof joists have sagged it seems that they were not designed to support accumulated water. Therefore if you can add drains at the lower points of the roof it could prolong the life of your roof.