The area you describe is dermatome for L-1 or so to L-3. Have you had a back injury recently, or even in past? The pain from any nerve compression (like with herniated/bulging disc, osteophytes from arthritis causing narrowing of foramina pressing on particular radicular nerve) etc is indeed excruciating, especially at night. I should know--every disc in my back is herniated or bulging, and the pain you described is identical to some of mine. It is narcotic-worthy. And, it will pass most likely unless it has become chronic.. Oh, also, most docs would prescribe gabapentin, an anticonvulsant that has been found to aid most types of neuropathy. If that's what is actually going on. In any event, please see a neurologist
Did you rule these out as the cause of your sudden thigh pain?