Actually, according to Dehkhoda Dictionary, "از خود رفتن" means "to faint" or "to pass out," therefore, "ز خود رفته" is quite the opposite of "lively"!
That makes it clear I guess. Just when it has almost died, the wave suddenly realizes it has to move in order to live.