Here's the explanation of the physics they gave:
Each nanowire was less than one-thousandth the diameter of a human hair, wide enough that an airborne water molecule could enter, but so narrow it would bump around inside the tube. Each bump, the team realised, lent the material a small charge, and as the frequency of bumps increased, one end of the tube became differently charged from the other.
"So it’s really like a battery,” says Yao. “You have a positive pull and a negative pull, and when you connect them the charge is going to flow.”