I would start checking some ground wires, I have also heard of this happening from a dislodged transmission filter. Also check the throttle body to see if its dirty, clean with a tooth brush and tb cleaner if it is, cleaning maf might help also. Not sure how your car has been maintained, anything tune up related couldn't hurt if it hasn't been done recently.