user471: This may sound similar to this question, but it's not the same.
This practice appears to be similar to the Khecari Mudra of Hindu yoga, but it's not the same, because the tongue need not be inserted into the nasal cavity. It is sufficient if it is pressed against the roof of the mouth.
This is based on the quote below from the Vitakkasanthana Sutta.
My questions are:

Since this appears in the Pali Canon, do contemporary Theravada teachers teach this?
How does it work? Does it stimulate certain nerves?
Is this considered a last resort to controlling the mind, or is it a regular part of Buddhist practice?


"If evil, unskillful thoughts — imbued with desire, aversion or
  delusion — still arise in the monk while he is attending to the
  relaxing of thought-fabrication with regard to those thoughts, then —
  with his teeth clenched and his tongue pressed against the roof of his mouth — he should beat down, constrain, and crush his mind with
  his awareness. As — with his teeth clenched and his tongue pressed
  against the roof of his mouth — he is beating down, constraining, and
  crushing his mind with his awareness, those evil, unskillful thoughts
  are abandoned and subside. With their abandoning, he steadies his mind
  right within, settles it, unifies it, and concentrates it. Just as a
  strong man, seizing a weaker man by the head or the throat or the
  shoulders, would beat him down, constrain, and crush him; in the same
  way, if evil, unskillful thoughts — imbued with desire, aversion or
  delusion — still arise in the monk while he is attending to the
  relaxing of thought-fabrication with regard to those thoughts, then —
  with his teeth clenched and his tongue pressed against the roof of his
  mouth — he should beat down, constrain, and crush his mind with his
  awareness. As — with his teeth clenched and his tongue pressed against
  the roof of his mouth — he is beating down, constraining, and crushing
  his mind with his awareness, those evil, unskillful thoughts are
  abandoned and subside. With their abandoning, he steadies his mind
  right within, settles it, unifies it, and concentrates it.


user3597: Yes I have heard this, was taught by a Theravada teacher in Sri Lanka.
I am not sure how it works, in fact I cannot explain in neurological terms. However I know serotonin helps to go back to the thing we want to do, to concentrate on. Serotonin can be increased by physical activity, I do not whether pressing tongue does that, but there must be a mechanism behind. According to the sutta, this method is the last resort to be used when a distraction comes to mind when the practitioner attends to a particular or useful theme. 

user2265: Having the tongue pressed against the roof is standard practice through all traditions. This is basic meditation advice, part of 9-step preparation for meditation, because of the way the chi channels connect, this is good for one's health and growth.
Clenching one's teeth on the other hand I have only read in the suttas as a "last resort" in eliminating and resisting distractions/temptations.
It should be taken as a literary device expressing the Buddha's compassion for our suffering and his urging for us to head straight to what we seek, rather than be side-tracked.

user254: 
How does it work? Does it stimulate certain nerves?

As Ahmed wrote, it is taught in Tai Chi.
When my Tai Chi teacher taught and explained it, it was in terms of Chi flow. His English vocabulary was small and I don't understand Chinese at all, so he could only give a partial verbal explanation. If I recall correctly though, a fairly constant theme of his was that our Chi tends to be too high in our bodies (e.g. up in our heads), and that we should practice bringing it lower (e.g. to centre it around the dan tien).
Some people (e.g. some Westerners) dispute whether there even is such a thing as Chi, calling it a "pre-scientific" description etc. Asking "How does it work, physically?" might not get satisfactory answers.
For me it might work as a learned compliance technique. Because I practised it (literally 'practice' i.e. deliberately repeating the same 'form' on many occasions), pressing my tongue to the roof of my mouth triggers many associated awarenesses (i.e. thoughts, movements, body-memories); it's a mnemonic which starts a whole check-list, for example, "head up, chin back, shoulders down, back straight, pelvis forward, knees bent, and connect the direction (in or out) of the breath to the direction (pull or push) of the hands". So for me it's (at least) a trigger of learned reflexes.
Similarly, perhaps if (or assuming that) you have practised that way (with the tongue) then using your tongue will trigger a remembered state from your past practice.
For what it's worth, it's a convenient gesture: like putting the palms of your hands together, or touching a thumb to a finger tip, it's almost always available, something that you can do in a moment, whether or not you're sitting down.
It's also a constant physical/sensory reminder: if you do it then you feel it, so it's a feedback loop or a circuit. If your mind would otherwise wander maybe it gives you something to focus your attention on.
The gesture also blocks your mouth. Maybe (I'm guessing) that helps to prevent not only talking but even subvocalizing (of internal monologue), and maybe turn awareness towards breathing.
Maybe too (I don't know, maybe I'm reading the wrong thing into it), in the context of the passage quoted in the OP, maybe it's that even if ever you don't control the arising of "evil, unskillful thoughts" you can at least continue by controlling your tongue and so on i.e. controlling your physical form.

user4836: According to Thich Nhat Hanh's "The Heart of the Buddha's Teachings" this is a mistake in transmission:
page 13-15 on google books.
In reality he was asking us not to do this!
The book quotes the Mahasaccaka Sutta, which contains a passage in which the Buddha said that he tried this technique unsuccessfully.

Even during the Buddha's lifetime, there were people such as the monk Arittha, who misunderstood the Buddha's teachings and conveyed them incorrectly (see the Arittha sutta). It is also apparent that some of the monks who memorized the sutras over the centuries did not understand their deepest meaning, or at the very least, they forgot or changed some words. As a result, some of the Buddha's teachings were distorted even before they were written down. Before the Buddha attained full realization of the path, for example, he tried various methods to suppress his mind, and they did not work. In one discourse (the Mahasaccaka Sutta), he recounted:

I thought, Why don't I grit my teeth, press my tongue against my palate, and use my mind to repress my mind?
    Then, as a wrestler might take hold of the head or the shoulders of someone weaker than he, and, in order to restrain and coerce that person, he has to hold him down constantly without letting go for a moment, so I gritted my teeth, pressed my tongue against my palate, and used my mind to suppress my mind.
    As I did this, I was bathed in sweat.
    Although I was not lacking in strength, although I maintained mindfulness and did not fall from mindfulness, my body and my mind were not at peace, and I was exhausted by these efforts, This practice caused other feelings of pain to arise in me besides the pain associated with the austerities, and I was not able to tame my mind.

Obviously the Buddha was telling us not to practice in this way.
  Yet this passage was later inserted into other discourses to convey exactly the opposite meaning:

Just as a wrestler ... use his mind to defeat his mind.

Often we need to study several discourses and compare them in order to understand which is the true teaching of the Buddha.


user43: In Mahayana, we take such things as expression devices - not literal instructions. In this case clenched teeth are a pointer to great effort, great application of willpower.
The objectives of samatha are to disidentify from the mind, to learn to control attention, to acquire concentration/willpower, to integrate the disjointed layers of psyche, and generally to attain a "tamed", "pliable" mind.
It is towards these that we apply the great effort. Especially when the inappropriate thoughts arise, and if other techniques did not work (such as switching attention to antidotes and other techniques described in that sutra), as a last resort, we apply the sheer willpower.

471: <p>This may sound similar to <a href="https://buddhism.stackexchange.com/q/1766/471">this question</a>, but it's not the same.</p>

<p>This practice appears to be similar to the <a href="https://en.wikipedia.org/wiki/Khecar%C4%AB_mudr%C4%81" rel="nofollow noreferrer">Khecari Mudra</a> of Hindu yoga, but it's not the same, because the tongue need not be inserted into the nasal cavity. It is sufficient if it is pressed against the roof of the mouth.</p>

<p>This is based on the quote below from the <a href="http://www.accesstoinsight.org/tipitaka/mn/mn.020.than.html" rel="nofollow noreferrer">Vitakkasanthana Sutta</a>.</p>

<p>My questions are:</p>

<ul>
<li>Since this appears in the Pali Canon, do contemporary Theravada teachers teach this?</li>
<li>How does it work? Does it stimulate certain nerves?</li>
<li>Is this considered a last resort to controlling the mind, or is it a regular part of Buddhist practice?</li>
</ul>

<blockquote>
  <p>"If evil, unskillful thoughts — imbued with desire, aversion or
  delusion — still arise in the monk while he is attending to the
  relaxing of thought-fabrication with regard to those thoughts, then —
  <strong>with his teeth clenched and his tongue pressed against the roof of his mouth</strong> — he should beat down, constrain, and crush his mind with
  his awareness. As — with his teeth clenched and his tongue pressed
  against the roof of his mouth — he is beating down, constraining, and
  crushing his mind with his awareness, those evil, unskillful thoughts
  are abandoned and subside. With their abandoning, he steadies his mind
  right within, settles it, unifies it, and concentrates it. Just as a
  strong man, seizing a weaker man by the head or the throat or the
  shoulders, would beat him down, constrain, and crush him; in the same
  way, if evil, unskillful thoughts — imbued with desire, aversion or
  delusion — still arise in the monk while he is attending to the
  relaxing of thought-fabrication with regard to those thoughts, then —
  with his teeth clenched and his tongue pressed against the roof of his
  mouth — he should beat down, constrain, and crush his mind with his
  awareness. As — with his teeth clenched and his tongue pressed against
  the roof of his mouth — he is beating down, constraining, and crushing
  his mind with his awareness, those evil, unskillful thoughts are
  abandoned and subside. With their abandoning, he steadies his mind
  right within, settles it, unifies it, and concentrates it.</p>
</blockquote>
 3597: <p>Yes I have heard this, was taught by a Theravada teacher in Sri Lanka.
I am not sure how it works, in fact I cannot explain in neurological terms. However I know serotonin helps to go back to the thing we want to do, to concentrate on. Serotonin can be increased by physical activity, I do not whether pressing tongue does that, but there must be a mechanism behind. According to the sutta, this method is the last resort to be used when a distraction comes to mind when the practitioner attends to a particular or useful theme. </p>
 2265: <p>Having the tongue pressed against the roof is standard practice through all traditions. This is basic meditation advice, part of 9-step preparation for meditation, because of the way the chi channels connect, this is good for one's health and growth.</p>

<p>Clenching one's teeth on the other hand I have only read in the suttas as a "last resort" in eliminating and resisting distractions/temptations.
It should be taken as a literary device expressing the Buddha's compassion for our suffering and his urging for us to head straight to what we seek, rather than be side-tracked.</p>
 254: <blockquote>
  <p>How does it work? Does it stimulate certain nerves?</p>
</blockquote>

<p>As Ahmed wrote, it is taught in Tai Chi.</p>

<p>When my Tai Chi teacher taught and explained it, it was in terms of Chi flow. His English vocabulary was small and I don't understand Chinese at all, so he could only give a partial verbal explanation. If I recall correctly though, a fairly constant theme of his was that our Chi tends to be too high in our bodies (e.g. up in our heads), and that we should practice bringing it lower (e.g. to centre it around the <a href="https://en.wikipedia.org/wiki/Dantian" rel="nofollow noreferrer">dan tien</a>).</p>

<p>Some people (e.g. some Westerners) dispute whether there even is such a thing as Chi, calling it a "pre-scientific" description etc. Asking "How does it work, physically?" might not get satisfactory answers.</p>

<p>For me it might work as a <a href="https://martialarts.stackexchange.com/a/5116/5893">learned compliance technique</a>. Because I practised it (literally 'practice' i.e. deliberately repeating the same 'form' on many occasions), pressing my tongue to the roof of my mouth triggers many associated awarenesses (i.e. thoughts, movements, body-memories); it's a mnemonic which starts a whole check-list, for example, "head up, chin back, shoulders down, back straight, pelvis forward, knees bent, and connect the direction (in or out) of the breath to the direction (pull or push) of the hands". So for me it's (at least) a trigger of learned reflexes.</p>

<p>Similarly, perhaps if (or <em>assuming</em> that) you have practised that way (with the tongue) then using your tongue will trigger a remembered state from your past practice.</p>

<p>For what it's worth, it's a convenient gesture: like putting the palms of your hands together, or touching a thumb to a finger tip, it's almost always available, something that you can do in a moment, whether or not you're sitting down.</p>

<p>It's also a constant physical/sensory reminder: if you do it then you feel it, so it's a feedback loop or a circuit. If your mind would otherwise wander maybe it gives you something to focus your attention on.</p>

<p>The gesture also blocks your mouth. Maybe (I'm guessing) that helps to prevent not only talking but even <a href="https://en.wikipedia.org/wiki/Subvocalization" rel="nofollow noreferrer">subvocalizing</a> (of internal monologue), and maybe turn awareness towards breathing.</p>

<p>Maybe too (I don't know, maybe I'm reading the wrong thing into it), in the context of the passage quoted in the OP, maybe it's that even if ever you don't control the arising of "evil, unskillful thoughts" you can at least continue by controlling your tongue and so on i.e. controlling your physical form.</p>
 4836: <p>According to Thich Nhat Hanh's "The Heart of the Buddha's Teachings" this is a mistake in transmission:
<a href="https://books.google.se/books?id=XJkmCgAAQBAJ&amp;pg=PA14&amp;lpg=PA14&amp;dq=heart+of+the+buddha%27s+teaching+%22Why+don%27t+I+grit+my%22&amp;source=bl&amp;ots=FZ8KTKK4jV&amp;sig=NVGDFoCbza0ZSdJK6DIBP-Tbb1A&amp;hl=en&amp;sa=X&amp;ved=0CCUQ6AEwAWoVChMI3s-f9vqixwIVQc9yCh2TRg0E#v=onepage&amp;q=heart%20of%20the%20buddha%27s%20teaching%20%22Why%20don%27t%20I%20grit%20my%22&amp;f=false">page 13-15 on google books</a>.
In reality he was asking us <em>not</em> to do this!</p>

<p>The book quotes the Mahasaccaka Sutta, which contains a passage in which the Buddha said that <em>he</em> tried this technique unsuccessfully.</p>

<blockquote>
  <p>Even during the Buddha's lifetime, there were people such as the monk Arittha, who misunderstood the Buddha's teachings and conveyed them incorrectly (see the Arittha sutta). It is also apparent that some of the monks who memorized the sutras over the centuries did not understand their deepest meaning, or at the very least, they forgot or changed some words. As a result, some of the Buddha's teachings were distorted even before they were written down. Before the Buddha attained full realization of the path, for example, he tried various methods to suppress his mind, and they did not work. In one discourse (the <em>Mahasaccaka Sutta</em>), he recounted:</p>
  
  <blockquote>
    <p>I thought, Why don't I grit my teeth, press my tongue against my palate, and use my mind to repress my mind?
    Then, as a wrestler might take hold of the head or the shoulders of someone weaker than he, and, in order to restrain and coerce that person, he has to hold him down constantly without letting go for a moment, so I gritted my teeth, pressed my tongue against my palate, and used my mind to suppress my mind.
    As I did this, I was bathed in sweat.
    Although I was not lacking in strength, although I maintained mindfulness and did not fall from mindfulness, my body and my mind were not at peace, and I was exhausted by these efforts, This practice caused other feelings of pain to arise in me besides the pain associated with the austerities, and I was not able to tame my mind.</p>
  </blockquote>
  
  <p>Obviously the Buddha was telling us not to practice in this way.
  Yet this passage was later inserted into other discourses to convey exactly the opposite meaning:</p>
  
  <blockquote>
    <p>Just as a wrestler ... use his mind to defeat his mind.</p>
  </blockquote>
  
  <p>Often we need to study several discourses and compare them in order to understand which is the true teaching of the Buddha.</p>
</blockquote>
 43: <p>In Mahayana, we take such things as <em>expression devices</em> - not literal instructions. In this case clenched teeth are a pointer to <em>great effort</em>, great application of willpower.</p>

<p>The objectives of samatha are to disidentify from the mind, to learn to control attention, to acquire concentration/willpower, to integrate the disjointed layers of psyche, and generally to attain a "tamed", "pliable" mind.</p>

<p>It is towards these that we apply the great effort. Especially when the inappropriate thoughts arise, and if other techniques did not work (such as switching attention to antidotes and other techniques described in that sutra), as a last resort, we apply the sheer willpower.</p>
