NEW HAVEN — On Jan. 12, a few days after registration opened at Yale for Psyc 157, Psychology and the Good Life, roughly 300 people had signed up. Within three days, the figure had more than doubled. After three more days, about 1,200 students, or nearly one-fourth of Yale undergraduates, were enrolled.

The course, taught by Laurie Santos, 42, a psychology professor and the head of one of Yale’s residential colleges, tries to teach students how to lead a happier, more satisfying life in twice-weekly lectures.

“Students want to change, to be happier themselves, and to change the culture here on campus,” Dr. Santos said in an interview. “With one in four students at Yale taking it, if we see good habits, things like students showing more gratitude, procrastinating less, increasing social connections, we’re actually seeding change in the school’s culture.”

Dr. Santos speculated that Yale students are interested in the class because, in high school, they had to deprioritize their happiness to gain admission to the school, adopting harmful life habits that have led to what she called “the mental health crises we’re seeing at places like Yale.” A 2013 report by the Yale College Council found that more than half of undergraduates sought mental health care from the university during their time there.