As long as your MacBook's battery is in good condition and the charging environment is safe, it's typically fine to leave it charging overnight.