At night sometimes I get a pain in my thigh that feel like a bee sting when I'm sleep then it's leave? What causes that?

Think about this. If it's on the lateral upper thigh, think about a condition called meralgia paresthetica. This is a mild neuropathy caused by compression of the lateral femoral cutaneous nerve. It could cause symptoms like this on the thigh. It is often relieved by avoiding tight belts or losing weight etc. Where is the feeling, and how long does it last?