There is following idiom in Russian "to write into the drawer" which is being used to describe situation when writer or scientist writes (sometimes prolifically) without publishing anything. Are there direct equivalent or some other idiom/expression which conveys the same idea in English?
The expression about which the OP inquires is the now largely historical term that is usually translated into English from the Russian писать в стол or писать в ящик ( http://phraseology_ru_en.academic.ru/27881/писать_в_стол ) as to write for the drawer, the significance of which is well described in an Economist article dating from 11 November 1969. One of the principal themes of the article is the central importance for writers in the USSR of enjoying the goodwill of the Writers' Union:
Prominent writers are a privileged section of Soviet society. Men like Boris Pasternak can survive a period of disgrace by living on their savings. Young men can take a job outside literature and go on writing in their spare time. Those who refuse to conform can write for the “drawer”—for posterity—or, in the case of the younger rebels, for underground publication. They can all show their work to their friends.
Along similar lines, this 2002 article from the Los Angeles Times describes the tragic life of the Hungarian writer Sandor Marai, from which I quote:
Marai survived the Nazis and their World War II collaborators, and even published some works during those years. The Communists who solidified power in 1948, though, proved to be more difficult. Writers were expected to publish works of socialist realism, ennobling both the worker and the revolutionary while denouncing the bourgeois values that framed Marai's life and his art.
Marai sought to remain silent, "to write for the drawer." But the Communists, he wrote, "would not let me be silent freely."
There is a phrase on the shelf which means
in a state of inactivity or uselessness
The verb form, shelve is also used
Decide not to proceed with (a project or plan), either temporarily or permanently
The phrase back burner is also used
A state of inaction or suspension; a position of relatively little importance: priorities that have been placed on the back burner year after year
All of these terms can be used for a range of projects in addition to writing.
Considering that you are saying there is no waste in the eyes of the writer, maybe x for its own sake or x for himself could fit?
He spent years working for that damned company, but his true ambition had always been writing for himself.
After writing fiction for its own sake for years, Nikolai considered publishing it as his memoirs, but eventually decided against it.
I'm at a loss for better suggestions.
No, there is no idiom that describes the process of prolific and futile writing in English. While there are many idioms for wasting time (flushing it down the drain), or egotistical behavior (getting high on your own supply), or excessive self-focus (navel-gazing), none captures the exact spirit.
This idiom also exists in Hebrew, probably migrated from Russian.
The best translation IMHO is "Closet writer", that was suggested by P.O. in one of the first comments above.