The American system is very flexible, so changing your field of study is acceptable even in the middle of a course. So, for example a student doing his or her MS in the engineering department of a particular university might shift to a program in the computer science department of that university.
Though this is acceptable, you must remember that when you transfer to a new department, the department may not accept all your credits. They may treat you as a fresh admission and accept only those credits that are common to both programs. So, before you change your course find out what credits will be accepted, see how many you will have to do all over again and then see whether it is really worth it. Only then is it worth thinking of changing your field.