Bad connection, the random working/not working probably changes from temperature and or bumps.
Start at the fuse next time it stops working. Wiggle it around (or if youre fancy check for power with a multimeter) then move on down the line. Can't remember if the relay is by the fuse panel or under the hood at the power box but you should be able to hear it clicking on and off when the wipers are on delay. If you can hear it clicking then the problem is between there and the motor. Check the connection in the harness to the motor (big clip) I've heard of a bad connection in there before and just plugging it back in fixed it.