Take two Calcium/Magnesium tablets just before bed and it works wonders! I've only been getting leg cramps when I've forgotten to take my Cal/Mag!

As for having them "linger" I hope the pain subsides for you. I don't have any other advice, sorry.