Is running an app all night harmful to the iPhone?
It could possibly be harmful if the phone overheats, though I spent several months with an older iPhone between my pillow and the bed, plugged in and charging, and never had any problems.

Other than that, no.