There's no difference if the iPhone is ON or OFF while charging, and don't worry about overcharging it, 'cause the iPhone automatically stops charging when its battery reaches 100%.
I started using iPhones in 2009 and I've always charged them overnight, every nights, with iphones ON (sometimes in airplane mode, sometimes without airplane mode). Batteries lasted at least 2,5-3 years or even more, without any problem. The only precaution I've always adopted was (is) that I do not let the battery go down below 15-20%.
Keep also in mind that battery lifespan is measured in cycles:
1 cycle = complete charge from 0 to 100%
1/2 cycle = charge from 50 to 100%
1/4 cycle = charge from 75 to 100% ... and so on.
Regards
Giulio