These systems do overheat.. You said a period of time, how long? Also, are you playing this thing on carpet, is it in an entertainment unit, is there any air-ventilation? If you are playing it on a flat surface, not on carpet, where there is air, you may need to open that sucker up and take a look. I've seen some pretty disgusting stuff inside a few N64s. There may be gobs of dust, or someone spilled some pepsi or something in it a long time ago and it's just making problems for you..
Steps above about cleaning all the contacts, checking your jumper pak / expansion pak, replacing your jumper pak / expansion memory are all good steps if you don't have the tools to open it. I would say you should check out your power supply as well, they do go bad and it may just be heating up and kicking itself off. I had a super Nintendo power supply that was "gooey" when I went to pull it off the wall.. has my finger indents in the plastic..