I did this last summer. Not a formal do, and as my daughter was doing the best man bit, and would HATE to do a speech, it all fell to me.
For a while (a week or two) I carried a little note book around, so when I thought of a phrase, I could jot it down. This helped a lot when I settled down to write. This was about two days ahead of the day. Over the next couple of days I tweaked, but it was mostly there as I'd given myself plenty of thinking time in advance.
I’ve been told that when public speaking, that to be heard you should stand up, and speak out; to make yourself popular, you should sit down and shut up.