I start with the medication of choice the night before boarding. That way it is well into your system, then I take another dose a couple of hours before the ship departs. After that, I usually go down to the health center on board where they have a bowl of free motion sickness pills available, and stock up for me and our traveling party for the rest of the cruise.
Motion illness is an unavoidable part of cruising for some, but prepare mentally, and go with the tide and enjoy the ride!