I couldn't really move my elbow after a few days
Why couldn't you move your elbow?
I injured it, then I was sleeping on it, that's why it's so sore.
You should always visit a doctor if you are having elbow pain. You need to make sure to take care of yourself.
I don't think it would be such a big deal if I hadn't slept on it.
Maybe so, but it sounds like you can't really be sure. Injuries can become a lot worse if they aren't treated promptly. I'd suggest getting it checked out, just to be safe.