This is a personal version of the tale Sun, Moon and Talia by Giambattista Basile Pentamerone book. It is the original story of The Sleeping Beauty.
The story is much darker and more macabre than it looks. :)
Here you can read the short story.
After the birth of a great lord's daughter, Talia, wise men and astrologers cast the child's horoscope and told the lord that Talia would be later endangered by a splinter of flax. To protect his daughter, the father commands that no flax would ever be brought into his house. Years later, Talia sees an old woman spinning flax on a spindle. She asks the woman if she can stretch the flax herself, but as soon as she begins to spin, a splinter of flax goes under her fingernail, and she drops to the ground, apparently dead. Unable to stand the thought of burying his child, the lord puts Talia in one of his country estates.
Some time later, a king, hunting in nearby woods, follows his falcon into the house. He finds Talia, tries unsuccessfully to wake her up, then has sex with her while she is unconscious. Afterwards, he leaves the girl on the bed and returns to his own city. Still deep in sleep, she gives birth to twins (a boy and a girl). One day, the boy cannot find his mother's breast; and instead he begins to suck on Talia's finger and draws the flax splinter out. Talia awakens immediately. She names them "Sun" and "Moon" and lives with them in the house.
The king returns and finds Talia is awake – and a mother of twins. However, he is already married. He calls out the names of Talia, Sun and Moon in his sleep, and his wife, the queen, hears him. She forces the king's secretary to tell her everything, and then, using a forged message, has Talia's children brought to court. She orders the cook to kill the children and serve them to the king. But the cook hides them, and cooks two lambs instead. The queen taunts the king while he eats.
Then the queen has Talia brought to court. She commands that a huge fire be lit in the courtyard, and that Talia be thrown into the flames. Talia asks to take off her fine garments first. The queen agrees. Talia undresses and utters screams of grief with each piece of clothing. The king hears Talia's screams. His wife tells him that Talia would be burned and that he had unknowingly eaten his own children. The king commands that his wife, his secretary, and the cook be thrown into the fire instead. The cook explains how he had saved Sun and Moon. The king and Talia marry; and the cook is rewarded with the title of royal chamberlain.
The last line of the fairy tale – its moral – is as follows: "Lucky people, so 'tis said, He who has luck may go to bed, And bliss will rain upon his head."