By Kupka-Smale theorem, a Morse function can be perturbed to become Morse-Smale by genericity. The perturbed function has identical level-set foliation up to diffeomorphism so it is conjugate by a diffeomorphism. Pulling back the metric by that diffeomorphism will give the desired metric.