Choose your molding and lay out the empty area that will be formed when you install the molding onto the ceiling and wall. Get some 2x4 stock and cut it to slightly smaller (about a 1/4" gap between the face of the 2x4 and the back of the molding will be OK) than the empty area. Install the triangular piece of 2x4 onto the wall by using drywall screws into the metal studs, one screw at each stud and be careful not to over tighten the screws so they tear out of the studs. Then attach you molding to the 2x4 filler with nails from an air nailer. Be sure that you use cope joints at inside corners and miter joints at outside corners.
If you elect to use structural/architectural foam molding, you will have to use the appropriate glue to join the pieces but you will still want to use blocking in the empty space/cavity.