It's the same concept. Too much of one emotion "runs the well dry". You need to mix it up a bit. You can have sidequests for comedy and levity, but too many and you lose your tone of "GrimDark" or you burn out players on those emotions instead of the original ones.
Moderation in all things.
I'll use a small snippet of my game as an example. It's a "GrimDark" kind of thing where bad things happen because people just make bad choices. But, there are moments amongst the party members where they attach levity and humor. One such moment is the "mentor" character ribbing my protagonist for always wanting to "find a real Dragon to slay" when "they haven't been alive for quite some time, they're extinct, and every time you think it might be a Dragon, we go marching off in a hurry to find it. Last time, it was wind blowing through a cave that sounded like a roar and we fell in a pool of sludge that the smell didn't leave for two weeks". It's a moment of levity. A quest to find a Dragon to slay. The mentor always tags along despite constantly protesting and bringing logic into our main character's fantasy.
But, I add other moments of levity as well. I have a joke weapon titled simply, "Walken Stick". Each time you strike with it, it sounds like a cowbell. The description of it is, "Weapon of choice". It's difficult to find and can be missed, but I suspect anyone who is a fan of Christopher Walken will get the joke immediately. This is for the player and not for the characters. A moment to go, "ahhhhh.... hahhhhhhh... I get the lame joke".
Even further, I sometimes just have funny things that can happen if certain events happen. You can take on a Quest to get the "Queens' Clothes", which is royal attire for a girl claiming to be a Queen and her stuff was stolen. You can get it back and equip it on your Mage. It's VERY powerful stuff. You can then tell her, "Nope, we didn't find it". But, if you have it equipped when you say that, she will call you out on your lie to your face. "Uhm. You do know that you're WEARING it, right? Do you really think that I'm so stupid that I wouldn't recognize my own clothes being wore by you?"
But, these are moments. They're in moderation. The game isn't about these moments. These moments highlight the rest of the game, play into the rest of the game. They help tell the story and inform you of who the characters are. Or, they're just amusing little side things you might notice, because hey, this world is a little strange too.
But, you need to practice moderation. Even in a primarily comedy driven game, you can "run the well dry" quite quickly. Jokes that don't land feel annoying to a person who is looking to laugh. Just balance things out. Use different emotions to create "breaks". Don't use the same emotions for every single break. If you do, you'll be running more than one well dry at the same time. Maybe after this moment of GrimDark, you've got one of heartwarming. Maybe after this next section of GrimDark, you've got an amusing joke scene. Maybe after the boss rofl-stomped your whole party as per direction of the story, you've got a moment of hope and self-reflection.
But, moderation is pretty much the key to holding the audience's attention when it comes to emotional reactions.