Restless legs

Every night just as im about to sleep my legs become so restless it’s driving me absolutely insane 😭 I try propping them up on a pillow but i cant keep them in the same spot. is there anything i can do to avoid it?