There could be a number of reasons for it.
You could have a boost leak - you might notice a different sound when it happens, but you'd certainly notice a drop in boost pressure. A commonly-used tool to monitor this (and a laundry list of other stuff if you want) is Torque for Android. All you need is a ELM327 Bluetooth OBD2 adapter, that app and set it up. Watch the boost levels.
Smoke makes a difference too. If your SCV is faulty, you might not see a lot of smoke, but restart the engine and everything works again. A bottle of injector cleaner might see that right, and I'd particularly do this if you notice that the engine doesn't idle steadily, but surges mildly (we call that "hunting" ). I had this happen to my car while we were in SA recently and a bottle of Nulon diesel injector cleaner did the trick - and I usually use Liqui Moly. It goes to show that brand really doesn't make a huge difference.
If it only resets (improves, goes back to normal, however you want to say it) after turning the car off, that's usually a sign of the SCV too. If it's overboosting (actuator fault, say) you should be able to get it running properly again simply by lifting your foot off the throttle and going again.
Other possibilities: faulty EGR valve (will make it run sluggishly, and produce black smoke). It could be an air path issue (may not produce smoke if the MAFS has figured it out, perhaps dirt inside the filter box?). A failing turbocharger can also do this (expect black smoke). If there's some wobble in the turbocharger's shaft it could "stall" as it spools up. Pop off the hose that runs between the turbo and the intercooler and wipe your finger on the inside then check the oily residue under a bright light. Sparkles = bad turbo.
That's a start, anyway.