The abnormal behavior you described would be classified as a "parasomnia," a term which broken down could be translated as "beside (normal) sleep." The episodes you describe may well be night terrors. Events such as this are most common in children; fortunately for you and the child, these episodes are usually outgrown. The best thing to do in such a case is simply to gently direct the child to a safe environment--back to his or her bed or into yours--and ensure that no harm is inadvertently realized upon the child by the behavior. If the child is awakened, confused or even combative behavior may be displayed, and so awakening the child is unadvised.
However, it is also important to note that other conditions may be present; while this forum may be informative, it is no subsitute for direct consultation. If uncoordinated tensing of the muscles or urination occurs with these eposodes, a nocturnal
seizure disorder might also be suspected.
In all likelohood, it is most likely that this is a run-of-the-mill parasomnia (insomuch as they are so); however, if you do notice any particularly disturbing symptomatlogy (aside from the screaming, movement) such as difficulty breathing, for example, it would be best to seek medical attention.
One further note: daytime and nighttime are related, and some claim that this realtionship is quite strong. Hence, some might also suggest that any stressors or frustrations in the child's like be addressed; though this one is too young for individual psychotherapies, it is most commonly focused on the parents and the environment anyways. This is another point worth considering in your approach to dealing with these episodes; it may be more or less applicable.