Release L and R, center both analog sticks (don't press them), and hold down Start+X+Y (start+right+top) for 3 seconds to recalibrate the analog sticks. That will probably fix it when it happens.
If it happens frequently, it could be a controller, driver, or Dolphin bug. (Eliminate all other causes first).
If it happens frequently, it could be a controller, driver, or Dolphin bug. (Eliminate all other causes first).