Simpson gene
In the Simpsons episode 'Lisa the Simpson', it is established that Homer and Bart carry the Simpson gene, which contributes to baldness and laziness. The Simpson gene is only carried by males so Lisa and Maggie don't need to worry; as a matter of fact, from what we're shown in this episode, it seems that Simpson women in general are very successful.
However, during the second part of 'Who Shot Mr. Burns?', Marge claimed that she shared everything with Homer when they were married, including Homer's DNA.
Homer has an unusual condition — "Homer Simpson Syndrome" — where his brain is cushioned by an especially thick layer of fluid, acting as a helmet of sorts. It is unknown whether the Simpson Gene causes Homer Simpson Syndrome, though the males in the Simpson family seem to have a thing for putting pots and pans on their heads and head-butting, suggesting a connection.
Another reason for Homer's stupidity is that a crayon was lodged into his brain when he was six. His IQ without the crayon was 105, placing him in the "average" bracket (100 to about 130, generally). However, in that episode, he was regarded as a "genius."
Biological interpretation of the episode
Homer has the defective Simpson gene located on the Y-chromosome. The simpson 'gene' is actually an allelic anomaly that exerts phenotypic dominance over its counterpart locus on the X-chromosome donated by his mother, regardless of the fact that they are non-homologous. Because it is a dominant allele in this hemizygous condition, the exceptional intelligence that would result from the expression of the allele on the X chromosome is repressed. This repression allows for the expression of only the simpson 'gene' and causes mental inertia to begin at approximately age 8 and continue to increase in severity until adulthood when it plateaus. Homer's intelligence is therefore naturally below average due to his genetic condition, but his years of work at the nuclear plant have mutated his Y-chromosome and have rendered his Simpson allele inactive. This grants him not only normal intelligence but exceptional intelligence (facilitated by the unblocked allele locus on his X-chromosome inherited from his mother). This intelligence, however, is not expressed because of a crayon lodged in the frontal lobe of his forebrain (a key area of regulation for cognition and behaviour) since he was a child( But he could not have been too smart when he was child to put crayons up his nose). It had been removed, revealing his extra-ordinary intelligence but he insisted it be re-lodged to restore him to normal social status of moron, rather than "nerdy genius".