Q:

Is it legal to show kids reaching orgasm with clothes on?

In Nymphomaniac: Vol. I (2013), A little girl is shown having orgasm while flying in the sky with clothes on. By narration it says girl is having orgasm.
In Babel, Kid is shown masturbating to his sister bathing. (masturbation not shown)
I already viewed this question, question is pointing to topless but I am referring to sexual thing which is orgasm. 
Is it legal to show kids reaching orgasm with clothes on? 

A:

In the US, at least, the law is reasonably clear.  Child pornography, which is unlawful, is defined as

any visual depiction of sexually explicit conduct involving a minor

Sexually explicit conduct is in turn defined as 

sexual intercourse, including genital-genital, oral-genital, anal-genital, or oral-anal, whether between persons of the same or opposite sex as well as bestiality, masturbation, sadistic or masochistic abuse, and the lascivious exhibition of the genitals or pubic area of any person.

But the action has to actually be shown.  A boy looking down, moving his arm rhythmically, would not count.
Separately, a work could be be prosecuted as obscene if 

the average person, applying contemporary community standards would find that the work, taken as a whole, appeals to the prurient interest; the work depicts or describes, in a patently offensive way, sexual conduct specifically defined by the applicable state law; and the work, taken as a whole, lacks serious literary, artistic, political, or scientific value.

