The Simpsons Season 5 Episode 22
Secrets of a Successful Marriage
Sick of being called slow, Homer signs up to teach a marriage class. When he fails, he realizes his only way to entertain the class is through revealing secrets about his love life with Marge. When Marge finds out, she kicks Homer out of the house and he goes to live in Bart's treehouse.