As far as I know he ever advocated for it, but he understood it as an inevitable reaction.
Off the tip of my head the only specific quote I can think of is his
"I think that we’ve got to see that a riot is the language of the unheard. And, what is it that America has failed to hear? It has failed to hear that the economic plight of the Negro poor has worsened over the last few years.”
No this is from a CBS interview with Mike Wallace. But he understood this concept and spoke on it a few other times from what I see.
After a quick search of the text, this is a similar quote from his "Letter From Birmingham Jail", so maybe this is the specific one you were thinking of.
"The Negro has many pent up resentments and latent frustrations, and he must release them. So let him march; let him make prayer pilgrimages to the city hall; let him go on freedom rides -and try to understand why he must do so. If his repressed emotions are not released in nonviolent ways, they will seek expression through violence; this is not a threat but a fact of history. So I have not said to my people: “Get rid of your discontent.” Rather, I have tried to say that this normal and healthy discontent can be channeled into the creative outlet of nonviolent direct action. And now this approach is being termed extremist."
As for the rest, I'm not much of an MLK-head, so this is basically where my ability to be helpful ends.