1. Bend your knees forward.

2. Straighten your knees.
2-2. Straighten your knees backward.
3. Spin your knees befor you exercise.
4. He hurt his knees while he exercised.
5. Massage your knees when you feel painful there.
6. Press your knees many times when they hurt.
------------------
Are they all grammatical with the word 'knees'?

Yes, they are all grammatical. I'm not sure how to bend my knees backward, though. They only bend one way! :)