Hi, D.. It sounds like Matthew's having night terrors. This is similar to nightmares, except the child is doing something akin to sleepwalking. He will be incoherent during these episodes, if he is able to talk at all, and may wet himself or defecate. You are correct that it is connected to toilet training -- that doesn't mean he has a problem with it during the day, but he may be having some anxiety about being successful with it which he doesn't communicate to you. Sometimes boys don't talk about their feelings very well.
He probably has anxiety about school starting, too. Again, he wants to be a big boy for you, and either can't talk about it or doesn't even realize he is scared, so it comes out at night.
Even though the subject of his dreams sounds pleasant, the dream subject is just a kind of vehicle (or mental container) for the anxiety. You see, the anxiety is actually expressing itself in a situation where he feels comfortable and stress-free.
So he's getting a double whammy, as they say. This is something you are probably going to have to ride out until he resolves these issues. Maybe you and Matthew could spend some time drawing with crayons together or using paints. Sometimes children will express themselves in art in ways that they can't express in words -- especially because he's only 3 and a half. This is why Art Therapy is so effective with kids!
PLEASE do not threaten or punish him! These situations are things he CANNOT HELP. He does not have the emotional maturity to deal with anxiety the way you do. I truly do not believe he is manipulating you, D.. I think he is trying to be a big boy, a good boy, for you, but his very real fears are coming out when he is most vulnerable and completely helpless.
Kids, even older ones, will have sleep disturbances from time to time off and on all through their childhood and adolescence. Let's face it: parenthood means never being certain of how many hours of sleep you will get every week, even when the kids sleep through the night. If he doesn't manage to resolve his fears in a week or so, you might want to consider getting some individual therapy or family counseling.
Peace,
Syl