Lots of deep breaths. James won't be able to do anything if he senses you are so distressed. So it is good that you ask this group. Here are some links to booklets that show what happens in a sleep study. Your particular hospital may vary the routine a little but not much. Ask if they have any materials like these or a video you can watch.
Nurses, techs, therapists, and librarians usually have a lot of information on these kinds of things and can point you to things you can read or watch. Don't be afraid to ask and ask again and ask again until you are comfortable.Sleep studies are a great source of critical information about your son's health. It is good that your medical team is on top of this. If your son needs to use sleep support at home, ask for information on how to get him to adjust to this. It is extremely important for his lung/heart health that you help him to do this every night at home if they tell you to do it.
Ask again if this is not what you needed to know or doesn't answer all of your questions.