So if Zen Mode does this: > Changes the Pokémon’s shape when HP is halved.
And the Darmanitan uses Rest, will it stay in Zen Mode or just revert back to normal?
It changes back to Standard Mode.
When Darmanitan's HP drops to below half, it will change into its Zen Mode at the end of the turn. If it loses its Ability, or recovers HP to above half while in its Zen Mode, it will change back to its Standard Mode. This Ability only works on Darmanitan, even if it is copied by Role Play, Entrainment, or Trace, or swapped with Skill Swap.
http://bulbapedia.bulbagarden.net/wiki/Zen_Mode_(Ability)#Effect