The story of Yaksha blessing impotent man with potency is found
in the 6th Taranga of Navama Lambaka of Kathasaritsagara. This story
shows that Yaksha fulfilled the wishes of humans and acquired the wrath of higher
beings.
In the city of Surpur there lived a king named Surasen. He
had a very beautiful daughter named Vidyadhari. When king Surasen came to know
that Prabhakar, the son of king Vimal, was equally handsome he wished to give
his daughter to him in marriage.
When king Vimal came to know about this he sent a messenger
to king Surasen and asked for the hand of his beautiful daughter for his son.
The marriage ritual was completed with pomp and show.
Vidyadhari, the bride, reached the kingdom of her husband.
On the first night, she saw Prabhakar disinterested in sex. She was immensely surprised.
She tested him and found him to be impotent.
Vidyadhari spent the night in distress and in the morning sent
a letter to her father and accused him of giving her in marriage to an impotent
man.
On reading the letter from his daughter, king Surasen
thought that king Vimal had deceived him. He flew into rage and sent a message
to king Vimal that to avenge the deceit he was going to kill him and capture
his kingdom.
A worried king Vimal convened the meeting of his counselors.
One of the ministers, Pingadatta told him that he knew the mantra and rituals
of appeasing a Yaksha named Sthulashira. One being pleased the Yaksha fulfils
the wishes of his devotee. The king should learn the mantra and the rituals and
when the Yaksha would manifest before him he should ask him for male
procreative organ. The king followed his advice and asked the Yaksha for male
organ for his son.
After receiving it prince Prabhakar attained full manhood
but now the Yaksha became impotent.
When Vidyadhari enjoyed the company of her now potent
husband she wrote back to her father and thus the king and the kingdom was
saved.
Yakshas were controlled by Bhairava form of Shiva. He became
angry and cursed the Yaksha that he will be impotent forever and Prabhakar
would attain full manhood for life.