Might seem a silly sugestion but are you sure you are drinking enough ? Water that is .
I know from experience that pushing yourself physically hard and not hydrating properly can result in cramping .
You're absolutely right about good sleep. There are so many benefits to it.