It could be a "pinched" nerve that could be caused by a bulging or herniated disc. For whatever reason, your sciatic nerve is being compressed and this results in feelings of pins and needles, prickling, and/or nurabness. When you change position it opens up space and the nerve can move again so the funny feelings go away.
To give you an example, I just had surgery two weeks ago for this condition. I had stenosis in my lower lurabar back (L4-5) which resulted in incredible pain when walking or especially, standing. After about 2 minutes, my right leg would go nurab from my hip all the way down to my toes. But if I sat down, the pain would immediately go away. I had no difficulty sleeping. But if I walked to the mailbox, I was ready to burst into tears!!
If you search for dermatome chart you will see that there is a direct correlation between a particular vertebra and what the nerves control. L4-L5 generally controls the nerve that runs down the outside of the thigh, calf and outer side of the foot. If the nurabness is on the top-side of your inner thigh, this would be the L2-L3 vertebrae. The dermatome chart will give you this information for your whole body.
If the problem persists, you will want to get an MRI to figure out what is causing the problem. It could be something temporary, maybe from laying in an unusual position when you had your heart procedure. You might want to ask your doc about that posibility!!