Our grandma's were not wrong when they instructed to apply and massage your hair 1-2 hours before hair wash. Most of the people are not aware that overnight oiling makes your hair frizzy. As pillow soaks moisture along with hair oil from your hair which can make your hair dry. When you leave hair oil overnight, it almost dries out, also the right amount of oil gets soaked our by scalp along with pillow hence when you wash your hair with a shampoo, you might find that your hair bit rough.
Similarly if you have oily scalp you should avoid keeping the oil overnight.