Does it help to climb in case of a partial engine failure? When the engines of a airplane show irregularities that do not reduce performance but indicate a possible failure of the engines, is it useful to climb to a higher level, to increase the glide length that is available in  case the engines stop completely?

The problem known in the cockpit is only that the engines do not run like they should. Say they make clearly unusual noises and slight vibration, but loose no performance. There is no indication whether the engines will fail, an in case the do fail, at which point in time that  will happen.
It's an emergency, without actual change in the planes performance.

As example, I think of a small single propeller plane, and a situation where longer glide path could be useful. But I think the question applies to any plane that can glide without power.
Agreeing with @Antzi, high engine speed when combined with some sort of small scale physical damage or corrosion is a typical failure mode for propeller engines. Combining that logic with the fact that propeller engines run more efficiently at lower elevations (higher air density) I would recommend against climbing. In fact, lowering your elevation and speed will greatly reduce the stress/strain you are putting on the engine and will likely give you a better chance of making it safely to the closest airfield.