Undertow and rip current are two different things. Undertow has a downward pull and rip current has an outward flow. I've never swam into ripcurrents. I have used ripcurrents to get my kayak through the waves, and the rip currents will basically shoot you away from the beach fairly quickly, so its no wonder that people freak out if they are caught in them. The wait it out means just that. Tread water. On calm days, I can almost float in the Gulf without doing anything. It doesn't take much effort to tread water if you are calm about it. The rip currents typically don't extend too far out, and you will eventually get pushed out and back to shore by the waves, if you are calm and relaxed and just treading water. I'll gladly demonstrate this using my kayak, without paddling, except for balance, if someone wants to tape it, if they thought it would be helpful in saving lives. I bet we could even get some SoWal lifeguards to give an example in the water. I don't like the swimming with the Sharks, so I'll stick to the kayak, ; ) otherwise....
Note that for faster return to the beach, it is recommended that one, who gets swept out by a rip current, swim parallel to the beach, to escape the push of the rip current. Then, once out of the current (and you will know when you are out), swim with the waves toward the shore.