I had this painful knee problem during my teens that kept me from doing any exercise at school and I could barely walk sometimes. It eventually went away after a couple months of resting and I resumed exercise and sports at school.
Lately when I sleep on my back and turn my knees to the side I wake up and they feel painful as if they're locked or something but then I put my legs in another position and I get back to sleep and when I wake up they're fine..
So, since I had this knee problem in the past I thought I should pay more attention to what leg exercises I do(or any exercise in general), but I'm not sure how to prevent injury. I lift at home and my room isn't too big for that reason I do squats by holding the bar at stomach level instead of behind the neck, is it ok to do it this way? I also heard that it's not good to squat too deep or below a 90 degrees because it puts excessive pressure on the joints?