Abu Usayd RA and Umar ibn Al-Khattab RA report that Rasulullah SAW said:
"Eat olives and apply its oil (to your hair) for verily it is of a blessed tree." (Musnad Ahmad, Sunan Tirmidhi)
Aishah RA reports that Rasulullah SAW used to pour the oil on his left palm and using his right hand, he would first apply some oil on his eyebrows,then his eyes and thereafter on his head (the right side first). (Muntahas-Sul)
However, men should not waste excessive time and effort in grooming their hair. This was prohibited by Rasulullah SAW for it is a habit of women to do so.