It happened to me a few times on my stock rom. Sounds like to me that the CPU may be getting over worked. Go to app settings and see what's running in the background. Kill any nonessential apps.
yea happened to me on my stock ROM before i rooted. eldub is right.....its pretty much resetting itself to fix an overworked CPU. it also does take a bit of time to do it too....its kinda like a system restore on a pc...it shouldnt take more than a minute or two tho. go to Settings >> Applications >> Running Services and kill anything that is nonessential (thank eldub for that suggestion...its his idea anyway i just reworded it lol)