Pajamas has always been standard in American English; pyjamas remains preferable in British English, though not with unanimity. Both originate from a Hindi or Persian word of similar pronunciation.