Hmmm....number of possibilities then!
Would this be a fair summary?
Leave as long as possible to allow best bulbing up, but not so long as to let rot develop (which will depend to some extent on wetness of soil) or to let the cloves go into another growing cycle. A good indicator is when the leaves start to topple over.
Wash and dry after picking. Once dry, the roots can be trimmed off.