Lord Shiva granted boon to Jayadratha because he has practiced the severest of ascetic austerities as described in Mahabharata ,Drona Parva, Abhimanyu-badha Parva, SECTION XL.
From a keen sense of his humiliation, the king practised the severest of ascetic austerities, desirous of a boon. Restraining his senses from all objects dear to them, bearing hunger, thirst and heat, he reduced his body till his swollen veins became visible. Uttering the eternal words of the Veda, he paid his adoration to the god Mahadeva. That illustrious Deity, always inspired with compassion for his devotees, at last, became kind towards him. Indeed, Hara, appearing in a dream unto the ruler of the Sindhus, addressed him, saying 'Solicit the boon thou desirest. I am gratified with thee, O Jayadratha! What dost thou desire?'