Sorry, I don't believe in AP and demons as real entities. This is your mind playing tricks on you.
However, there could be a real expalnation for the pain. Do you have any waking pain?
Maybe you had something else causing you real pain while you were dreaming?