Glad you were able to find a solution to this problem. The outer ear is mainly composed of cartilage. Pain can occur if it's irritated. I believe this is called auricular chondritis. Like other areas of the body that have cartilage, it can become irritated for a variety of reasons. It sounds as if pressure from your pillow was the culprit.
Thanks. Now I have a diagnosis. I never liked gristle on meat, but now I see that I wear some all the time!