Sometimes it happens. Yet, most men avoid massage for fear this will happen to them. Or, they get a massage but are unable to relax because of this fear. But there is no reason to be embarrassed.
Sometimes men get an erection during a non-sexual, therapeutic, full body massage. Touch administered to any part of the body can activate the parasympathetic nervous system, which can result in a partial or complete erection.
An educated, professional massage therapist understands this and it will not be an issue for him/her. If you are still concerned, I recommend wearing more fitted underwear (briefs or boxer briefs) which provide more support than traditional boxers.
Note: If the therapist feels that the session has turned sexual for the client, male or female, he/she may stop the session to clarify the client’s intent, and may decide to end the session immediately.