I'm trying to remember any novels that actually pull this off well, because on paper it sounds like a mess. Ecchi is fanservice, action is about momentum, and humor can derail either. But there are a few examples, mostly in light novels, that manage the juggling act. It's all about using the humor to deflate tension right when the action gets too serious or grim, keeping things from tipping into pure horror or melodrama.
Take something like 'Is It Wrong to Try to Pick Up Girls in a Dungeon?'. The action sequences are often high-stakes dungeon crawls, but then you get these moments of absurdity—a character's ridiculous special move, a failed romantic advance mid-battle—that remind you not to take the world-ending threat too seriously. The ecchi elements often are the humor, the accidental gropes or torn clothing presented as slapstick rather than pure titillation. It creates a tone that's adventurous but never oppressive, like a Saturday morning cartoon with a cheeky wink. The blend works because it refuses to commit fully to one genre; the tonal whiplash becomes part of the fun.
Without that humor, the ecchi in an action setting could feel exploitative or the action could become monotonously brutal. The comedy gives the reader permission to enjoy the ride without overthinking it. It's a tough balance, though—too much humor and the stakes vanish, too little and the fanservice sticks out awkwardly. When done right, it feels like a group of friends bantering during a dangerous quest, where the adventure is real but the mood stays light.