If your car was non DBW, I would start with 'check the IACV' (or if you prefer EACV). But, yours is DBW so I think the best thing would be to get the service manual and check the trouble shooting procedure for the idle control system on DBW cars. There are a bunch of inputs to the ECU (clutch switch, neutral switch, brake switch, TPS? ......) that affect the operation of the idle control system. The ECU uses those inputs to go into closed loop idle control where it monitors the actual engine speed and controls the throttle to keep the engine speed constant at the idle setting. The combination of clutch in, brake pedal depressed should put the ECU into closed loop idle control once the engine speed drops below the idle threshold. I would hazard a guess that the switches might be inoperative or operating intermittently; but, that is just informed speculation. Best to go through the trouble shooting procedure for the idle control.
If you were having other driveability problems, I would consider the throttle body as jwmelvin suggests; but, if the car has been running well and this came out of the blue then I would check out the operation of the idle control system.