Do you pick him up quickly when he does this?
My daughter is also 3 months old and would occasionally do that. One night she did it and I couldn't get to her right away, and about 5 minutes later, she completely stopped, fell back asleep and slept for another about 6 hours. I just chalk it up to a nightmare, but my doctor doesn't seem concerned about it since she goes right back to sleep.