This may be due to formation of a cyst around the joint capsule which might be protruding out on flexion of knee joint.
Next Steps
You should get USG of knee joint to identify the cause.
Also, you can start using crepe bandage for compression.
Analgesic can be taken if there is pain.
Health Tips
Avoid sitting down cross leg or full flexion of knee..