I had "growing pains" when I was about your son's age. They would usually happen in the spring and summer when I was outside, running around a lot. Also, my mother kept me slightly dehydrated so I wouldn't wet the bed. I remember crying and writhing in bed because the pain was so bad. Mom thought I was faking it and just wanted in a baby aspirin (that's how long ago this was), also, she was mad because she would have to go down to the kitchen and get the baby aspirin because she didn't think to keep some in the upstairs bathroom.
The pain can be intense (as I've described). From personal experience, a "growing pain" probably works something like a heel spur (which I also have). A lot of pressure is put on the knee joint, and an active child just puts more pressure on it. Once the pressure is off, such as lying in bed, some physiological change takes place (I'm not sure what, maybe slightly swollen tissue, blood being able to circulate better, constricted blood circulation, etc.) which the body reads as pain. My heel spur only bothered me at night when I was trying to go to sleep, just like the "growing pains."
Make sure your son stays hydrated. If his knees hurt, don't be afraid to give him a pain reliever. The baby aspirin probably worked for me (and pretty quickly) because it is a pain reliever and might help reduce swelling. Tylenol and Motrin are very good pain relievers. I was prescribed ibuprofen for my heel spur, and that helped a lot. See if you notice what level of activity might provoke "growing pains" like soccer practice and give him a pain reliever before bed.
The pain is very real, but fortunately doesn't last in to the next day, and he will "grow" out of them. My daughter hasn't had any growing pains, as far as I know. But I make sure she stays hydrated.