Yes, it is okay to leave a heating pad on overnight if it is needed for a short-term emergency.