My knees have clicked for years, and as with Flintstone it's usually after a period of inactivity. Never had any pain from them so I don't let it worry me.
I've heard somewhere before (can't remember exactly where) that the source of the clicking is a fluid which gathers in the affected (not infected!) area during inactivity, and I also heard that it's tendon related as Nearly There pointed out.