the battle took place after king alfred and his army had been hiding in the marshes of wessex for a long and miserable year , while the danes and their leader , guthrum , managed to take over most of engla-lond .