1800, pai jamahs "loose trousers tied at the waist," worn by Muslims in India and adopted by Europeans there, especially for nightwear, from Hindi pajama, probably from Pers. paejamah, lit. "leg clothing," from pae "leg" (from PIE *ped- "foot," see foot) + jamah "clothing." Modern spelling (U.S.) is from 1845. British spelling tends toward pyjamas.