I am awful with lyrics but I can say for me, musically, my best compositions have hit me like a brick (sometimes at the most inopportune time) to where I either had to get the ideas down (before my monkey mind forgot them) ...or they were gone.
On the other hand I have toiled for hours over trying to make myself come up with ideas with damn near zero results.
On the other, other hand, those ideas that hit me like a brick were always tweaked by the monkey mind...so my answer would have to be... both