Douglas Harper's Etymology Dictionary
seven-year itch
1899, American English, some sort of skin condition (sometimes identified with poison ivy infection) that either lasts seven years or returns every seven years. Jocular use for "urge to stray from marital fidelity" is attested from 1952, as the title of the Broadway play (made into a film, 1955) by George Axelrod (1922-2003), in which the lead male character reads an article describing the high number of men have extra-marital affairs after seven years of marriage.
Wiktionary
seven-year itch
n. The temptation to have an affair after seven years of being married.