'On June 16th 1963, for the first time ever, a woman sang in space. The singer was Valentina Tereshkova, a 26-year-old Soviet cosmonaut and former textile worker, and the song was about her homeland, Mother Russia. Valentina had left the planet human beings inhabit, with all its diverse frontiers, to become the first woman and fifth cosmonaut after Yuri Gagarin to pioneer a new order of living in the unexpected dimensions of the universe... She remains to this day the only woman to accomplish a solo flight in space for three days'.
Tereshkova had been in a folk group, playing the domra (a Russian stringed instrument). In an interview she was asked 'During his flight Gagarin sang to Mission Control and he heard them play a popular song 'Moscow night'. You also sang during your flight, can you remember the words?'. She replied: 'They were something like this:
I see the black Heaven close to me
Beneath me the Earth is full of poppies
You are awaiting me Earth
I am flying, flying, flying.
My Earth until you call me back.'
This sounds like she may have made this up, in which case this would have the honour of being the first song written in space.
Source: Valentina: First Woman in Space, Conversations with A. Lothian (Durham: Pentland Press, 1993)