Us quacks use diagnostic algorhythms to rule out various nasty monstors, rule in more likely differentials, then attempt a course of treatment to see if we were right. If it gets better, I musta been spot on. If it doesn't, I missed, and use the information from the miss to inform the next step in care, ticking likely culprits off as I go.
Pain in the legs/knees at night with an MRI of the knee being negative for any site-specific findings in the knee tells me...it ain't the knees. That's out.
Other monstors in the closet that could cause it range from very simple and easily treatable, to some scary s**t. Starting from scary to not so scary,
1. Cancer. Space occupying lesions in or along the spine can traction the perineurium, causing referred pain. "Pain that wakes the patient at night" is one of those red flag things in a history that compels a practiioner to get a white blood cell count, and double check their x-rays to make sure there are no signs of tumor processes. "Progessively getting worse" matches what we would worry about with a tumor process. As a male, prostate cancer that's metastized to spine is one of the big scaries. In your age group, however, not as likely as if you were 60.
2. Non-cancerous space occupying lesions. Fatty tumors or scar tissue in or around neural foramen can do the same thing. The bigger they get, the progessively worse the discomfort. Some learn to live with it; some have to be removed surgically. Depends on the patient motivation, and symptom severity.
3. Discogenic causation. Crappy discs in the back can be the space occupying lesion. Some get bad enough, that they gotta be cut out, or trimmed down. Others cause more irritation than real damage, and any number of stretches (MacKenzie protocol), therapies (rolfing, chiropractic, alexander movement therapy) can help resolve peripheral tensions, and reduce symtoms.
4. Segmental dysfunction. This can be anywhere from the waist, down, and cause the symptoms you describe. Couple of bones in the spine get too much tension between them, muscles jump on the bandwagon, fluid accumulation builds up in the joint space as an afterthought due to the lack of proper movement imbibing interstitial fluids, and starts to act as a transient space occupying lesion. The longer it goes without correction, the more entrenched it becomes, and the more symptoms you start to get. Blood flow to the nerve roots gets compromised, so nerve flow to the muscle gets compromised, so end organ function gets compromised (in this case, muscles in the legs), so your body sounds an alarm to get your attention that somethings wrong (aka, Pain). Easy enough to fix: Osteopathic stretching, or chiropractic adjusting, or seeing a PT for some PNF of the waist and lower extremities, or getting the focal tensions rubbed out by a massage therapist, or having some big swedish Helga shove her elbow into the space until it releases (akin to Travell's trigger points stuff, maintaining contact until the focal lesion gases out from ischemia), and so on.
5. Vascular dysfunction. Actually, shoulda put this one up towards the top. Blood flow into the legs can get occluded from atherosclerosis. Your doc should make the distinction between the parameters of how to invoke the discomfort -- dependent versus independent positions. Sometimes they gotta roto-rooter out the veins in your thigs and legs; sometimes you just gotta take aspirin or ginger or Chinese herbs for vascular syndromes.
6. Progressive kidney issues. Also should have put this one up at the top. Folks wwho are sneaking up on diabetes or toxicity syndromes affecting their kidneys will often get back pain, and occasionally present with leg pain. Not always actually worse at night, but just notice it more at night because we're just laying there without distractions. Blood and urine testing required to rule out scary monstors.
Most common culprit is joint dysfunction. The location at the knees smells like Sacro-Iliac (SI) joint to me. I'd bet that if you have someone poke a thumb over the SI joint, and sideways from it a little, you'll be quite tender. As a chiro, I've noticed that sacral segmental dysfunction tends to run in a pack with C2 intersegmental dysfunction. The second bone down in your neck; if your neck is tender right under the skull, or behind your lower jawbone towards the rear, esp if more on one side than the other, that's kinduva dead giveaway. Couple Chiro cracks should set you straight. Rolfers can do a muscle-stripping release version of same thing, called "floating the sacrum". Osteopaths and Physical Therapists also have their methods for slow stretching it out (as opposed to the quick stretching that occurs with a chiro crack). Almost useless is the bottle of pills your family MD is going to send you home with.
If your house is on fire, and the alarm goes off, how would you feel about a fireman who took the call, came by, only turned the alarm off, then left? That's what the painkillers do. In addition, they are linked to approx 11,000 deaths per year, while abreactions to properly prescribed medications is guestimated to be the 4th largest leading cause of death among adults in the US. Of course, if you like playing Russian Roulette with your health, it's certainly your perogative.
Avoid the solution that's not really a solution; leave the pills at the doctors office. Your body is talking to you; have the sense to listen. Your health effects everyone you know, and everything you do, so take care of it.
Be well,
D.