oneirodynia

painful condition (pertaining to) a dream, i.e. a nightmare