Toyota Repair Problems? Ask a Mechanic for Answers ASAP
The oil pressure sending units are pretty common to fail on this engine. The earlier models were more problematic, but the design has not really changed and I have seen the newer years fail regularly as well.
To be certain you should ideally have a mechanical oil pressure gauge fitted in place o the sending unit to verify your oil pressure is in healthy shape. Considering this is an intermittent problem, the chances of an actual oil pressure issue are rather slim, however it should be checked just to be certain.
The specification at idle is only 4.2psi, and at 3000rpm you should have a minimum of 43psi (max 85).
If all looks well, disconnect the wire from the oil pressure sending unit and turn the key on and confirm your gauge reads at zero. Then, ground the wire from the sending unit to a solid ground and confirm your gauge reads maximum pressure.
If you do not get consistent results from this test, there is an issue with the gauge or wiring; the ext step would be to test closer to the gauge to eliminate the wiring, but honestly I think I have seen only a few gauges actually fail.
If the previous test are consistent, your wiring and gauge should be fine and that leaves you with just the sending unit.
The sending unit is only about $25 and can be changed yourself with basic tools. It is mounted on the oil filter housing.