I have no idea, but for future reference put a brick in the pool to be used as a step. A step to get in is good too. How old is the duck? Hopefully they're just incredibly sore.
I've had an issue with a duck who didn't want to walk. I separated her in a dog kennel so she could get to food and water. I believe she had malnutrition, so I changed the feed to chicken layer pellets. It took her a few weeks to be strong enough to stand and get around.
The main thing I learned was patience. She needed to take her time to heal. @chickens really is probably right though, given the circumstances. He swam all night and has worked for those hours.