I'm 17, I have a severe aching pain in my ankles and knees at night to the point where I can't fall asleep, I play sports and am constantly on my feet?

It sounds like you. r putting a lot of mechanical stress on your ankle and knee joints.To reduce the pain,you may have to stop the activity that is causing the pain.Acute joint pain is treated with R.I.C.E.( rest,ice,compression( for any swelling with an ace bandage),elevation(also for swelling)).If there is any redness or swelling,you need to c a doc to examine these joints and order x-Rays,labs,meds,excuse to coach.