I been having this problem for some years. My problem is that i have a misaligned vertebrate. I assume, when i lay down, it puts pressure to my insides and cause the pain. I know some people have said that is due to posture. Well, i dont think so. I tend to sit up right even while driving. I never drive with my sit tilted towards the back like most people do. I also, have noticed that when i fall asleep sitting in the bed or sofa, i dont feel any discomfort. The things is, while i sleep soundly in that position; it can bring other problems. Like, swelling in feet and spider veins.