What's the mechanism for being mentally tired?
There is ongoing research on this topic, but there is a theory known as inhibition theory. It has been defined as:


  Inhibition theory is based on the basic assumption that during the performance of any mental task requiring a minimum of mental effort, the subject actually goes through a series of alternating latent states of distraction (non-work 0) and attention (work 1) which cannot be observed and are completely imperceptible to the subject.


For a more in-depth explanation, see this paragraph from Wikipedia:


  Directed attention fatigue occurs when a particular part of the brain’s global inhibitory system is overworked due to the suppression of increasing numbers of stimuli. This temporary condition is not a clinical illness or a personality disorder. It is rather a temporary fatigue of the inhibitory mechanisms in the brain. According to inhibition theory, it is natural for one to alternate between periods of attention and distraction. Although one’s efforts may involve very different tasks, each incoming stimulus calls upon the same directed attention mechanism.


or this paragraph from NCBI:


  Recently, it has been shown that the neural mechanisms of mental fatigue related to cognitive task performance are more complex than previously thought and that mental fatigue is not caused only by impaired activity in task-related brain regions. There is accumulating evidence supporting the existence of mental facilitation and inhibition systems. These systems are involved in the neural mechanisms of mental fatigue, modulating the activity of task-related brain regions to regulate cognitive task performance.


In short, it is now believed that the brain contains mental facilitation and inhibition systems, which control mental freshness and fatigue. Basically, when you concentrate, you actually stop all distractions from taking over (and not give more focus to the main point). This mechanism is governed by the inhibitory system of the brain. After some time, this system stops working ('it gets tired') and you become unable to pay attention towards anything. That's  why it is advised that after some time of concentration, you need to distract yourself (to refresh your inhibitory system); like, say, while preparing for exams, you should have a break of 5-10 minutes after studying for about 45 minutes.

Now, why mental tiredness causes physical fatigue can be (I think) summarized by the diagram below from here:



The exact process at this part is rather very interesting. Here, the neurons are not firing as quickly as they do normally. See this Wikipedia page:


  Physical fatigue can be caused by a lack of energy in the muscle, by a decrease of the efficiency of the neuro-muscular junction or by a reduction of the drive originating from the central nervous system. The central component of fatigue is triggered by an increase of the level of serotonin in the central nervous system. During motor activity, serotonin released in synapses that contact motor neurons promotes muscle contraction. During high level of motor activity, the amount of serotonin released increases and a spillover occurs. Serotonin binds to extrasynaptic receptors located on the axon initial segment of motor neurons with the result that nerve impulse initiation and thereby muscle contraction are inhibited.


The same might happen in the case of mental fatigue i.e. the excess serotonin released from frontal or parietal lobes, or even the inhibition system itself, can cause the same effect i.e. inhibition of muscle contraction.

References:


Inhibition theory
Directed Attention Fatigue
Neural mechanisms of mental tiredness
Mechanism of physical fatigue from mental tiredness
Fatigue