Hi John. We can continue after this if you'd like
This sounds like a sudden fairly severe attack of bursitis since there really wasn't any trauma involved like a twisting of your knee or an actual contusion from a fall.
For now, ice, elevation of the leg, ibuprofen, and topical capsaicin cream will help.
If you can rest the leg for a day or two that should be enough time for the swelling and pain to subside but if it doesn't get any better by that time you need to have a doctor look at it and get an x-ray since it's possible you've got a crack in your kneecap