I will add to Shira's excellent advice, after you do these things to attempt to isolate what causes the pain, to call the doctor and ask about it.
From your description it sounds like he's twisted his knee. I've done this a few times in my life. There is no sign of injury. What has happened is that the ligaments get stretched and this causes the pain. Once the ligaments heal, the pain is gone. There is nothing that can be done to hurry that process.
A very common way to twist a knee is to be wearing non-skid or non-slip soles and turn the body but the foot doesn't turn. It's not uncommon for toddlers to get spiral fractures doing this. However, if he'd fractured his leg, he wouldn't be able to walk on it and would be in excruciating pain. I think it's possible that he could have a spiral hairline fracture/crack. Though it's doubtful because his leg it's self is not tender. The only way you'd know for sure is with an x-ray.
I suggest that the doctor will want to do an x-ray. If he's still favoring the leg in a couple of days, I'd make an appointment to see the doctor.
BTW They never put an ace bandage, cast, or brace on my knee when I'd twisted it. They said that I needed to continue using the knee to keep ligaments strong. But to not stress it. No running or jumping.