Why does my right thigh go numb minutes after I lay down. And also when I'm standing or walking? It's numb from the kneecap up to the hip. I

Meralgia Paresthetic. Meralgia paresthetica is a benign condition in which the anterior thigh will experience numbness, burning, tingling sensations from stretching of a nerve just below the surface of the skin or from compression of the nerve. It is usually relieved when the leg is flexed and turning on your side. It is a simple condition which is best left alone unless severe.
See below. It could be femoral neuropathy, radiculopathe affecting l3-4-5. See your doctor.