I don't have a general solution but for older versions of windows there was latency mon or something (similar exists for Windows 10 but I have forgotten the name). This might help you identify the culprit.
The way I use it is I start latencymon (or similar), Running that I'll then stop applications one by one and see if the latency spikes disappears.
If that doesn't help next I'll stop services one by one.
If it is software related you should find it this way - usually Windows is quite stable in itself and it is "just" a misbehaving driver.