noodnik is attested since 1925, nudnik since 1929. From Yiddishנודניק(nudnik) < root of נודיען(nudyen, “to bore”) + ־ניק(-nik, “noun-forming suffix”). Ultimately from Proto-Slavic*nuda < Proto-Indo-European*neuti-(“need”) < *nau-(“death, to be exhausted”).
Compare Russian нудный(núdnyj, “tedious”), Ukrainian нудний(núdnýj, “tedious”), Polish nudny(“boring”), Old Church Slavonic ноудити(nuditi) or нѫдити(nǫditi, “to compell”), Hebrew נוּדְנִיק(“nag”) and English -nik.