You probably slept funny. Sometimes i sleep weird and my hurts too but I wouldn't be too worried- there are very specific symptoms for an oncoming heart attack
and I think you would know if you were really having one.
If you're really worried, ask your parents about their history, were there any relatives with heart problems? On your next doctor's visit, I'm sure they adequately examine you to ensure your heart is functioning ok, but you can ask them to maybe check extra closely and do a test.