Leaving hair oil in a baby's hair overnight is perfectly safe. But remember not to use it excessively to avoid clogging their pores. You may also use the oil to gently massage the baby's scalp for a better night's rest.