If you are using a wireless charger you may not have it aligned with the coils inside the charger. It will switch back and forth all night. A slight reposition on the charger may correct this. If you are using a cable to charge then I would guess it could be the plug on the cord or port on the phone.
I almost have the same issue but it happens when I have it plugged into the car charger. but as soon as it hits a certain percentage it stops. Is it normal? it doesn't do it with any other charger so far just in the car.