S05E22 Secrets of a Successful Marriage
Homer is given the task of teaching an adult education class about relationships. He fails to woo the class until he starts talking about his and Marge's sex life. When Marge finds out, she orders him not to talk about their private life again. But then he invites his entire class to dinner. This is the final straw for Marge and she chucks him out of the house. He then moves in to Bart's tree house. After seeing the error of his ways he asks Marge for a second chance. She accepts and the two reconcile.