Thanks for the advice everyone. I've since found an article where it suggests that starting too fast is a major factor in later cramps. I suspect that I overdid it a bit, but also I didn't really do enough long runs before the race, hence why I ended up with hamstring cramps. I'll hope that starting slower will prevent it as my legs are no better trained due to injury.