One of the regular Baen authors who has gone through periods of prolific writing did an interesting blog post awhile back. He basically said that over the last year or two he's been engaging with fans, attending various conventions, his marriage is in a stable place and he just hasn't been writing because.. he's engaging socially and positively with people. And that in consideration, the times he's been actually writing and producing novel after novel... were the times he was unhappy with something, when he was withdrawn and didn't have friends and such around him and he realised where he used his writing process as an escape from those feelings.
Which left him in a slight conundrum, because of his successs as a writer, he was in a positive place, which meant he wasn't able to get engaged with his muse and write like he used to. He was semi-joking about "If I want to be able to write properly again, I'm going to have to stop talking with fans, stop engaging with my friends, tell my wife to leave me alone for a few months and go and hide out in the basement with bare minimum tv food and lots of coffee and whiskey until I'm not really happy anymore."