Pain behind the knee could be caused by a condition known as baker's cyst. It could also be due to a tear on the ligaments behind the knees. It would be best to seek immediate medical attention for proper diagnosis and treatment.
you might have a cramp or you may pulled a muscle or broken a tendon. Hold and icepack on it for a while. If it's just a cramp that should work. If it still hurts tomorrow you should probably go to a doctor.