The advice given above is accurate to a point, and I agree that what you experienced was probably an episode of TMJ. The temporomandib joint is the most complicated joint in our body and there are a number of reasons that TMJ can suddenly appear. Most often the cause of TMJ is muscle tenion, often manifested by clenching or grinding your teeth or an anatomic problem with the joints.
TMJ, if left UNDIAGNOSED, can progress into a difficult condition to treat. I would suggest the next time you're at the dentist, tell him about this experience and he/she will probably take an X-ray of the TM joint to check for any abnormalities. If the condition continues and any anatomic reason has been ruled out, your dentist will check if you are grinding or clenching your teeth. Simple devices placed over your teeth at night will prevent this.
While I agree there is no need to worry, there is also no reason to ignore this.
PEACE
Greenlydia
This sounds like TMJ, and unless it happens again, requires no treatment. It actually has nothing to do with the ear itself, it's the joint in front of the ear, but it can cause referred pain that feels like it's in the ear. You may have just slept on it wrong or something, since it went away, no need to worry.