I have been going through this in silence. It happens mostly when I have a pressing piece and I am somewhat tired. Writing helps me relax which in turn helps me sleep easily without the usual chaos. Then I doze off and when I am coming to it... it's gone.
The agony. Creative births are hard so the deaths are painful as hell. Where I come from we say, pole sana I am very sorry!
Maybe there is a lesson in here along the lines of "kill your darlings" ? Gets us used to the feeling of loss.