This is the same tale of the Moonspinners that is in Mary Stewart's book of the same name:
...the story of the Three Fates--the moonspinners. One story about them says that the thread they use to determine each person's lifespan is created from moonlight.

Every month on the full moon, they gather a moonbeam from the surface of the ocean and spin it into their magical thread. As they create the thread, the moon dwindles in size until no moon remains except for the empty spindle.

On that darkest night, they return the unused thread to the water, and the moon begins to grow again as the moonlight is gathered back onto the moon's spindle.

http://marilynnbyerly.com/marilynnbyerly/whatsnew.html
The book's setting is Greece. I don't know if this is a legend of that particular country or not.