It is also called hypnalgia. It is a pain that is only felt during the period of sleep and disappears upon awakening.
Nictalgia : Pain that only occurs at night.