In his essay “Of Doubts and Dreams,” recently republished in About Writing, Samuel R. Delany tells this story, which concerns the late, great Thomas M. Disch – may he rest in peace – and which takes place (from here on I'm quoting Delany) “at a science fiction writers' conference in 1967 during a discussion about what to do when a story or novel runs down in the middle and the writer loses interest. The usual half-hearted, half-serious suggestions had been made, from 'take a cold shower' to 'kill off a main character.' Then Disch commented that the only thing you can do in such a situation is to ask of your story what's really going on in it. What are the characters' real motivations, feelings, fears or desires? Right at the point you stopped, you must go down to another level in the tale. You must dig into the character's psychology deeply enough (and thus build up your vision of the story's complexity enough) to reinterest yourself.”
I first read this at some point in the 1990s, and I think it's the piece of fiction-writing advice I've found most personally useful. Not always simple to follow, of course, if the ground is made of reinforced concrete, and the only spade is a plastic toy, and there's a tornado coming...