Since the problem is intermittant it is almost impossible to test the suspect parts while they are working. The next time it acts up try and determine what is missing fuel or fire and this will help narrow it down. The cam or crank position sensor are highly suspect though.
I hope this helps, it is very difficult to diagnose intermittant problems.
Mechanic
Self employed all around Auto Repair and Muscle Car and Drag Racing enthusiast