Sometimes it is the people who no one imagines anything of who do things that no one imagines.
...features an it-cleft construction with a cleft subject. A cleft sentence is a construction whereby a sentence is divided in two parts, each of them with their own verb, in order to emphasize a certain element – namely a subject, object, or adverbial expression. Verbs can be emphasized only in pseudo cleft-sentences.
An example of an it-cleft sentence would be:
She left => It was she who left.
The meaning is essentially the same but the emphasis can make a big difference. Depending on the context, the second version could come across as an accusation (e.g., "Everything that happened happened because of her. After all, it was she who left, wasn't it?"), among many other possible interpretations.
In the sentence at hand the canonical order would be The people do things that no one imagines. The clause who no one imagines anything of is just a relative clause whose antecedent is "people": The people who no one imagines anything of do things that no one imagines. If the speaker wants to emphasize the subject (the people who...), they can place it at the end of the sentence using a "dummy it":
It is the people who no one imagines anything of who do things that no one imagines.
Compare the "it" and the second "who" with those in "It was she who left". None of them were there in the canonical sentence but are necessary in the it-cleft version.
In conclusion, the first “who” is a relative pronoun introducing an adjective clause. The second “who” is whatever you call the pronoun you need in cleft sentences. As with most it-cleft sentences, you wouldn't put a comma between both fragments.