I don't usually write out the entire song. What I usually do when I'm improvising on piano is I'll choose a key at random, start rolling some progressions or what have you, get some repetition in there. I'll add another chord progression as a B section, pick a time signature, transpose it into a few other keys to see if playing it there gives my fingers new ideas... then I'll put my laptop on top of my piano, open up Audacity, and press the big red button. Then, I'll play it a few times as it's being recorded. Sometimes I'll even record the entire process so I can make use of any and every intriguing idea that surfaces throughout.
Once I have an A and a B section that have substance, I'll work out a transition between the two, maybe add an introduction, a vocal line...
The best way to prevent "composer's block" is not to ground yourself in anything. Like I said before: if I'm playing a song in 4/4 time and in Cb, I might start playing it in Bb, Cb minor, 3/4, or my favorite, 6/8. Time signature changes obviously force you to keep an open mind about the direction your piece is taking, which is important as a tool for preventing writer's block.
If you have any questions or would like some feedback on your work, feel free to email me at email@example.com.