Yes, charging overnight can damage your device's battery as well as the charger. Your Mac would typically take no more than a couple of hours to charge sufficiently. So, leaving it with the charger plugged in for the whole night can heat up your battery and charger. While this is not an issue occasionally, keep in mind not to make it a habit.