Crackling, popping, or snapping sounds in a joint clinically termed crepitus—are extremely common and almost always benign when unaccompanied by pain, swelling, locking, or joint instability.
It is due to mainly Synovial Cavitation (Gas Bubble ) in joint.
Tendon and Ligament Snapping while Range of motion of joint.
If it is painless no need to worry.
Next Steps
do your gym exercises with right posture and with caution. and if crackling sound is more then Consultant an ORTHOPAEDIC SURGEON.