For years, my knees have got sore if my legs are bent for too long. So, occasionally, I have to kick the leg straight and my knee clicks. Is this the same thing you are talking about?
I haven't seen a doctor about it but it's been happening for years and I've never had a problem with my knees or any pain or anything.