Charging all night
If you plug your phone in when you go to bed and let it charge all night, it still won't overcharge the battery. But it's important to mention that you should never charge a lithium-ion battery unattended.
When the phone is fully charged the electronics in the battery tell your phone to stop sending electricity from the charger to the battery charging circuit. Power still comes in, it just doesn't work at recharging anything and goes back out to the wall socket (electricity travels in an unbroken loop to and from the power source). If your phone is still powered on the battery will discharge because it's being used. When it discharges to a certain point, charging starts again. This cycle repeats until you unplug it in the morning.
A lot of work was done to make sure the cell inside the battery doesn't overcharge at any time. Even during the night while it's on the charger. If you're going to charge your phone overnight, make sure everything works properly and you're charging properly. That means you don't have the phone under a blanket or laying on the rug while it's plugged in or have it in a thick sealed case that keeps the heat in. Plug it in (or put it on a wireless charger) somewhere that it won't get tangled up in your bedclothes or knocked to the floor.