It comes from the Hindi word "pajama," which itself is derived from the Persian "pāy-jāma," meaning "leg garment."