From a structural standpoint, one of the biggest reasons Freeman’s Mind works so well as humor is that, in the Half-Life story, Ross Scott’s version of Gordon Freeman embodies not one or even two, but three humorous juxtapositions which can take turns to ensure a steady flow of humor.
First, since Half-Life’s story and character interactions were written to imply a mature, serious, respectable silent protagonist, it’s quite amusing to see an immature character with an apparent lax sense of right and wrong slotted into those interactions (As long as it’s done so it still makes sense) …not to mention the inherent humor potential in characters who somehow managed to achieve a university-level vocabulary and understanding of science, philosophy, and history without gaining any maturity in the process.
Second, most of the time, Scott’s Freeman seems to treat his mental tangents with equal importance to the serious, immediate concerns of his surroundings. For example, when he returns to the giant, noise-making alien in the rocket test chamber and, having just been daydreaming about riding a sea turtle to rob cruise ships, comments “Wow. You may be a reptile, but you’re really dangerous. You’re not like a turtle at all. I don’t like that.”
Both are forms of generating humor by denying a person or situation the respect/reverence/seriousness/deference we expect and, by using two or more humorous themes, you reduce the need to have one carry the whole burden of finding something to laugh about in every location or interaction.
Finally, Freeman tends to come to conclusions very notably different from what the designers of Half-Life intended (eg. that the soldiers who are trying to kill him are obviously immature jerks who don’t understand the meaning of “rescue operation”) and occasionally make obvious-in-retrospect comments to support those viewpoints. (Jokes based around not ignoring the rough edges in the immersiveness of the game can also fall into this category.)
Fundamentally, all three boil down to the same core pattern which underlies all humor on the listener’s side: Make sure the audience has expectations, then break them in a way that doesn’t cause them discomfort. (Humor on the joke-teller’s side is generally rooted in empathy and social connectedness since it’s usually impossible to tell a joke properly before you’ve let its effect on you wear out)
Obviously these aren’t magic bullets but, by providing three different “jokes in the abstract”, they make it much easier for someone with a sense of humor to know where to start looking to find humor in any given situation. In other words, they’re excellent as guards against writer’s block or tools for coming up with multiple jokes and then keeping only the best one.
You can even go further and subdivide your themes into more specific areas if you feel it’ll help you to keep better track of which topics are getting overused and which ones might offer alternative jokes.