Sounds to me like poor warm up/cooldown process with this. Most hammy problems are, speaking as a multiple serial sufferer.

Since a physio friend showed me the correct warm up stretches I have never had another problem since.