If there’s one thing Matt LeBlanc and Jesse Tyler Ferguson know, it’s how to make audiences laugh. During their one-on-one conversation at Variety’s Actors on Actors studio, the stars of Showtime’s “Episodes” and ABC’s “Modern Family” discussed how they keep their roles fresh after a long run of several successful seasons. And, of course, crack each other up in the process.

Jesse Tyler Ferguson: I think the first time I was on TV was for a Dasani water commercial. That was the first time I was ever in front of a camera. And then my first television thing was this mini-series on CBS called “Sally Hemings: An American Scandal.” I played one of Sally Hemings’ illegitimate children. Carmen Ejogo played my mother, Diahann Carroll was my grandmother, and Sam Neill was Thomas Jefferson! I had to ride a horse at one point and flee the plantation. You know, like, flee out of slavery, because my character was half black and I was born into slavery. I know it’s a stretch. I told them I was able to ride a horse just because I wanted the job.

Matt LeBlanc: Right!

Ferguson: You’ve seen me ride a horse. I’ve been to your ranch.

LeBlanc: On a merry-go-round. (Laughs)

Ferguson: Yes, exactly. So they basically just throw you on a horse with a rope and…

LeBlanc: But the horses on TV shows and movies are pretty well trained.

Ferguson: You would think, but then you put someone on one who has no idea what they’re doing, and they’re like, “Well this is going to be fun for you.” And the horse took me through the field l this (zig-zagging motion). When they showed me the playback, they were like, “OK, we need you to just work towards getting to ride in a straight line.” They ended up shooting that scene from a blurred window inside the Monticello house. With smeared Vaseline all over the window so I was basically like this roaming dot. It was supposed to be this big dramatic shot of me on a horse going through this field.

LeBlanc: And then you went back to your journal and checked off “cowboy.”

Ferguson: Yes!

LeBlanc: So you guys are in season….

Ferguson: We just finished season six.

LeBlanc: Season six. I was on a show that ran for a while, too. How do you keep it fresh year after year?

Ferguson: I would ask you that! I need advice. I don’t know how you guys did it (on “Friends”) because it always felt very fresh to me. But for us, I feel that with these characters, I always feel, you sort of fall into a pattern and you fall into stereotypes and there is, I think, a part of the audience that doesn’t want to see you be something else, and doesn’t want to see you change too much and grow too much. They tune in to see a very specific thing. They don’t want you to reinvent the wheel. So I feel keeping it fresh really falls onto the backs of the writers and coming up with great storylines. And I think they’ve done a pretty fantastic job, actually. This past season we didn’t have any over-arching theme. We didn’t have a wedding, we didn’t have babies coming. It was just life as usual. And I feel like that almost reset the show in a way. It brought it back to a show about families. It doesn’t have to be super crazy and it’s just finding the comedy within the everyday situation.

LeBlanc: I think for me, it was just staying interested. You know what I mean? If you just stay focused on what you’re doing and work as hard as you always were, it feels fresh still.

Ferguson: But did you feel after year six or seven that you were fighting this stereotype or the box that your character’s in?

LeBlanc: Not really, because it was such a contained environment. You know? (“Friends”) was pretty contained and it was just people sitting around talking about life. Some people got married and there was, you know, babies and stuff like that, but it was all about information and how that information was shared with the group. You know, it’s funny, early on there would be, especially with my character, there would be (episodes about) “Joey would be on a date.” You would see the date in the table draft and they would cast a girl, and we’d be out on the date — and then as the years went by you never saw the date anymore. Even those episodes, you rarely would see the date as the week went on. The date would get cut. The actress would get paid, but never work.

Ferguson: Because they want to see you back in the situation of sharing…

LeBlanc: They want to see (Joey) bringing the information to the group. And it always seemed like the strongest episodes are with the least amount of guest cast.