Did you injure your knee anytime ? If the pain is without any knee injury and there is locking sensation in the knee,it could be a sign of early degenerative changes in the knee joint.You can get an X-ray done for your knee to rule out arthritis.Since you are having early morning pain it means there is inflammation in the joint.
Next Steps
you can apply cold pack to relieve the pain and swelling,and can take anti inflammatory medicine for instant pain relief,like ibugesic.