Leaving oil on your hair overnight isn't always the best choice. Experts say applying hair oil 15 to 30 minutes before washing may better protect hair from damage during shampooing while helping retain moisture. However, keeping oil on for too long may increase dandruff and scalp irritation, especially in people with oily scalps.