Hit with pillow usually does not cause any head injury
unless your head hits some other object. But in your case as you are having headache and ear discomfort , I suggest first you would need a sound sleep.
If your headache persists you need to take some non steroidal anti inflammatory drugs (NSAID
) medications and see.
But if at any point your symptoms deteriorate or you feel disoriented, blurring of vision , vomiting
,ear bleed or nasal bleed then you have to take a CT Scan
brain ( plain ).
However in your case I do not feel the need for urgency.