Your body refreshes itself at night as it prepares for a full day ahead. So why shouldn't your smartphone battery get the same treatment? Now, when you are fast asleep dreaming about the 2018 flagships, the cell inside your phone will charge for the two hours or so that it takes to get back to full strength. For the rest of the night, software will stop the charging process once the battery is back to 100%. This prevents damage that could be done to the battery by overcharging. But it doesn't prevent the battery from generating heat.
Heat can quickly lower the capacity of your phone's battery
If you keep your phone under your pillow or blanket, or even inside a case at night while charging, you could be limiting the ability of your battery to charge up to full capacity. For example, if your battery hits a temperature of 104 degrees Fahrenheit for a year, you will only recover 65% of the battery's capacity when you charge to 100%. Even more amazing, if your battery is running at 140 degrees Fahrenheit for just three months, the cell will lose 40% of its capacity.
The data shows that keeping your battery charged between 40% and 80% will allow it to have an optimal life, which suggests that a mid-afternoon power snack is a good thing for your phone's power cell. Charging overnight will not allow you to monitor this (unless you get up to pee every hour). So if you are going to let your phone charge up all night, make sure that it isn't covered by anything that would make the battery heat up unnecessarily, including a case.