My 02 did the same thing. It also had trouble downshifting into third while in cruise control. Took it to dealer and had codes pulled since these problems are indicative of a troubled tranny. Service manager recommended having the filter changed along with a pressurized flush, clean and refill of fluids. This has taken care of the problem now for about 6 months. The next step would be to take the tranny apart for a rebuild which would cost far more than the flush. I always try the cheap option first since I'm a diehard optimist. Just don't ignore this because this could result in catastropic tranny failure. Lots of info about this online so do your homework.
I hate to say it but my tranny did the same thing and it was toast. The rebuild is gonna cost an arm and a leg. If I were to do it all again I'd swap in a 5 speed. If the OD light starts flashing, something is wrong with the tranny no matter what someone else tries to tell you.