A simple google reveals many potential explanations, but it's a common problem with older North American N64s and darn near impossible to accurately diagnose without trying almost everything. The hardware is notoriously finicky, now quite old, and generally difficult to troubleshoot.
Common explanations include overheating, dirt, and hardware failure.
Prevalent approaches to identifying/resolving this generally go like this:
- Remove expansion pack and test for the issue. If this solves things, it looks like expansion pack has failed. It could be the connector pins or internal hardware or even just dirt on the pins, although that's less likely. Inspect and clean with isopropyl rubbing alcohol on a q-tip and dry with a q-tip as well - do not blow on or use compressed air. You may have to replace it.
- Check if the reset button on the console is stuck down, even a little as that's been know to happen with this hardware. If it is slightly depressed, try to very carefully lift the button with a small flat tool such as a knife or flat-headed screwdriver. Test for the issue. If this fixes things, then keep an eye on the reset button - you might even consider jerry-rigging a way to prop the button up if the issue resumes.
- Clean the pins and connectors of the console and games with isopropyl rubbing alcohol on q-tips. DO NOT BLOW ON OR USE COMPRESSED AIR - it's even in the manual that this can damage the system or games. After sufficiently cleaned and dried (again, with q-tips), test for the issue. If this fixes the issue, try to keep the system and area around it cleaner.
- It doesn't matter if hardware is first party or original or whatever - all hardware eventually fails, but some are sooner than others. The most likely failure that is easy to diagnose is the power adapter fusing. The only way I know to test the adapter is to swap another adapter in and see if it does the trick.
- Everything else involves opening up the system and poking around. Cleaning as described above any areas which are visibly dirty or dusty. TAKE EXTREME CARE WHEN MUCKING ABOUT INSIDE THE SYSTEM. The hardware of this device is very touchy and a wrong move can make the situation much worse. The most I'll recommend is a visual inspection to look for anything amiss, especially around the reset button housing and beyond that, I can't even find clear directions about where to start trying to fix this.
- The only step remaining is professional repair or simply replacement. This issue is mostly prevalent in the first generations of N64 in North America and if that's the version you have, it might be more worth your while to replace the console outright. Trying to get it repaired anymore is likely not going to be cheap or easy so I'd recommend replacement of the console itself regardless at this point.