Matsura Sayohime (松浦佐用姫) was a legendary heroine in Japanese Buddhist mythology, who is commonly conflated with Otohihime, the wife of Otomo no Sadehiko. Matsuura Sayohime is also the title of a noh play about the character, whose authoship is ascribed to Zeami.
Matsura Sayohime Wikipedia
The original Buddhist legend of Matsura Sayohime tells of how she was born to Lord Kyōgoku after he and his wife prayed to the Bodhisattva Kannon. After her father's death, Sayohime was too poor to sponsor a memorial service for him; to raise funds, she sold herself to a man named Gonga no Tayu, who (unbeknownst to Sayohime) intended to sacrifice her to the snake deity of his village in place of his own daughter. When presented to the snake, Sayohime read from the Lotus sutra, enabling the deity to achieve enlightenment and shed its monstrous form. The deity then returned Sayohime to the care of her mother.
Otohihime was married to Otomo no Sadehiko, a general engaged in war with Korea. When Otomo left on an expedition in 536, Otohihime climbed up a mountain above the harbour at Matsura to wave him off and pray for his safe return. In the most common version of this legend, she prayed with such fervour that she was transformed into stone. The image of Otohihime/Sayohiome waving her scarf from the mountaintop has become a motif in Japanese art. In an alternate version, related in the Man'yōshū, she was visited five nights later by an apparition who appeared to be Otomo. She followed this man, found him to be a snake demon and then apparently perished; her bones were found in a marsh on the mountain.
In the Noh play Matsuura Sayohime, she drowns herself in the sea after waving from the mountain.