So if your headliner is sagging down and bothering you enough to do something temporary, you can get away with using the spray until your new headliner arrives or you have time to do it right. Remember, if it's vinyl, you will have.melting issues, but this can be done...if you have cloth, this might help even more.
Get about a 18 gauge syringe needle, 2" long is plenty. Actually buy like 3. A vet clinic is the best place to get them. Might want to explain what you are using them for. About 50 cents per.
Use a hot glue gun to glue the syringe to the spray nozzle. This is tricky and don't stick yourself! A helper is good. Make sure to do a practice spray to make sure it's glued on straight and the adhesive doesn't shoot out sideways because your hot glue job wasn't good.
Now poke the needle through the headliner. With the vinyl, you can slide it right through the perforated holes.
IMO, start where the liner sags the most.
Start spraying, a lot. Move your spray can around, up, down, side to side, so you can imagine spraying on both the liner and the backing board. Rotate the can around like a periscope to get as much coverage as you can. There's a video on YouTube of Ifa guy just putting a dime sized squirt every few inches. This will not work with our deteriorating foam. It will just fall down the first hot weather or driving with the windows down. If you have vinyl, some of the adhesive may drip through, have a cloth rag(not paper towels) available, and don't be shocked when you start to see wrinkles like freaking cat anuses wherever the vinyl kind of melts as mentioned . This will happen where there are the most drips so trying to get a nice smooth even coat especially on the foam backing while you spray is important.
Wait for about one song on the radio (ok, not freebird) about 3 min or so. Then start pushing the headliner back in place with the rag. Middle towards edges.
Your headliner should stay up. You will have places that you couldn't or didn't get adhesive on, just poke through and repeat the process with smaller amount but complete coverage.
With a cloth headliner, this might be a long lasting fix. Vinyl, because of wrinkles, it's just a temporary fix.
Oh, and like a spray can of paint, turn it upsidedown and spray the adhesive out of the syringe, put the syringe cap back on and you will be able to reuse it later on. I just redid a couple spots on my headliner and the can was sitting at least a couple of months.
Im currently deciding what direction to go for a completely new headliner, so this is a short term fix that keeps the headliner up and out of the way.
Good luck.