When you leave your smartphone plugged in for long periods of time it will automatically stop charging itself once the battery is full, switching to a trickle effect to keep itself at full charge instead. This prevents damage to your battery, and it also means it's safe to leave your phone plugged in overnight without any negative effects.
Cell Phone Batteries
Modern cell phones use either lithium ion or lithium polymer batteries. Unlike nickel cadmium and nickel metal hydride, lithium ion and lithium polymer batteries don't suffer from the memory effect. This means that you can charge or discharge them to any percentage without the battery's overall life span being affected. This in turn means you don't need to worry as much about how long you leave your phone plugged in since these batteries are better at handling various levels of charge.
Trickle Charging Effect
When your phone is completely charged, it switches to a trickle effect. This means that it'll draw only as much power from its power adapter as it needs to keep its full charge. Your phone still expends energy as long as it's on, even if it's plugged in. Whenever the battery is fully charged, however, it simply stops charging and will suffer no ill effects. Your battery will probably degrade from the effects of time before it experiences any issues from charging overnight.
A battery's length of life is measured by its number of cycles. A cycle is when a battery goes from a full charge to completely discharged. Incomplete cycles will add up over time; for example, if you discharge your phone from 100 percent to 50 percent, back to 100 percent and then discharge it to 50 percent again, this will only count as one cycle, not two. This happens to your phone charging overnight, but on a much smaller scale. Your phone may lose and gain a charge of a single percent overnight, but this means that it will take months before even one full cycle is registered on your battery.
While modern phone batteries don't suffer from the memory effect, it can help to completely discharge and recharge your phone about once a month. While this doesn't affect your battery's health, it does recalibrate your phone's battery meter to help it be more accurate. Don't let your battery become too hot, however; excess heat can damage a battery much more quickly. Also avoid using cheap adapters for your phone, since lower quality adapters could also damage your battery.