Shakespeare has an interesting way of incorporating magic into this play. In both scenes you inquired about, the characters associate the fantastic things that were happening with dreams.
In Act 3, scene 2, remember that the characters are drunk, and at first they are confused by the strange happenings. Ariel instigates and anger erupts among the men--they are angry that Prospero has trapped them on the island. The men plan to murder Prospero. They rally together and begin to sing off key, when Ariel chimes in with his pipe. The men are frightened, but Caliban tries to ease their mind:
"Be not afeard. The isle is full of noises,/Sounds, and sweet airs [tunes], that give delight and hurt not./Sometimes a thousand twangling instruments/Will hum about mine ears, and sometime voices,/ That if I then had waked after long sleep/Will make me sleep again; and then in dreaming/The clouds methought would open and show riches/Ready to drop upon me, that when I waked/I cried to dream again."
In Act 4, Scene 1, the trio encounters lavish garments that tempt all but Caliban. This, again, instigates an argumentative situation.
Earlier in the scene (lines 115-119), Ferdinand also associates his experience with a dream. Upon seeing Juno, Iris, and Ceres, Ferdinand says, "This is a most majestic vision.." According to the Shakespeare Lexicon, the "majestic vision" suggests a dream. A few lines down (155-159) Prospero also alludes to dreaming.