Ultimately from French cauchemar, via a Slavic language, like Russian кошма́р (košmár) or Polish koszmar.
קאָשמאַר • (koshmar) m, plural קאָשמאַרן (koshmarn)