I don't think it will be a problem.. just drill your pivot holes about a foot or so from the end of the wood so the 'legs' are long enough to give you the required height.. think of it as a lopsided X with the lower portions long and top portions very short. Also, 2x4's may be a bit overkill.. Depending on mast weight/length and other supports in place, I've used 1x2's and 2x2's with good success. Round the edges, maybe custom cut the top portion where the mast will rest, a little varnish and you can make a pretty nice looking support that will last you a long time.
I'm sure others will have additional (and better) suggestions, but I have used this type of support on many different boats without any problems so far.. knock on wood
Cheers,
Brad