The story
From John (“outhouse; lavatory; chamber pot; toilet”). Possibly derived from a "euphemistic phrase of excuse" (e.g., "visiting my cousin John" or "going to cousin John's house"), similar to modern use of "powdering one's nose", but this is unattested.
Etymology from Wiktionary, CC BY-SA 4.0.