oneirodynia

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

Breakdown:

dream

painful condition