The source is Ovid, Metamorphoses, Book XI, 710-42. Ceyx was on his way to consult the oracle at Claros when he was shipwrecked. His doting wife, Alcyone, dreamed of the disaster and the next morning she discovered his drowned body being washed ashore. She was so distraught that the gods took pity on the couple and transformed them into birds.