Cant figure out why I have a lot of pain in my legs when im laying in bed I have to move constantly because layin one way for awhile makes me hurt?

Pain or RLS? Is it just pain, or is there a restless feeling in the legs with an urge to move them that you cannot resist? Pain can have many causes, but the need to move that you describe makes me wonder about restless legs syndrome. If your legs feel restless, you have to move them and moving them helps for a little bit of time, then see a sleep medicine specialist for treatement.