Ulysses knew that when the sirens come he will be temped, so he tied himself to the mast, asked his men to tie themselves to the mast and to put beeswax in their ears, so that they wouldn't be tempted, either.