This is a common issue as the foam on the back of the roof vinyl starts to break down and allows the vinyl to separate from the foam. if you get it exposed you might be able to use some staples to hold the roof vinyl in place.
This picture shows what the metal strips look like.
__________________
2007 Winnebago Journey 36SG and 2013 Honda CRV Toad
e-Trailer XHD Towbar (Demco) Blue Ox baseplate, SMI Stay N Play brakes
The plastic strips slide in over the metal piece shown in the picture from Tim. With some thin pliers you can lift up the end and then slowly start pulling it towards the far side (away from the sag) of the coach. Once the plastic is off the sagging portion you can glue the fabric back down and then slide the strip back. Not had to glue the fabric myself, but I would imagine some cyanoacrylate glue (crazy glue) might work well. Probably would want to avoid anything with a volatile solvent like contact cement that would tend to eat/dissolve the fabric.
that plastic cap pops off of a metal retainer. the problem will be that the plastic gets old and hard and does not want to snap back on to the metal strip . i had to order a new piece of plastic. to get it off. start at one end and pry carefully to get it started.