.....but, to tell you the truth, I wouldn't know WHAT to enter - nor exactly WHERE.
Your keyboard has a built in midi sequencer. It's probably counting in clock pulses, 96 or 192 clocks per beat. (some systems use a 100 based count, so an 1/8th note would be 50 clocks, etc) (this is not the same as your tempo setting)
Sustain is midi controller number 64, a simple on / off parameter. You should be able to insert a "controller #64 ON" midi event into the midi timeline or piano track at time 01:01.001 (bar 1, beat 1, first clock pulse). I would be surprised if the Motif does not have the ability to do that.
But honestly you shouldn't have to do that. If you start recording, and don't start playing or stepping on the sustain pedal until after the clock is running, you should not have this problem. This is why people above say record an empty bar or two at the beginning to allow for these initial events to get recorded. If you step on the sustain pedal first and then start the clock running, the first sustain pedal will not get recorded.
Keep in mind this is not the same as a "pre roll" or a count-in. Most midi sequencers do not record during count in. They usually don't record until after the clock starts running because that's how they get the time stamp to tack on to each midi event, which is how it can record and playback the events "in sequence." That's why they call it a sequencer.
Some older systems (like my original Atari 1040!) did record everything in a buffer whether the clock was running or not. If I practiced my part first, and then started the clock running, it would try to play back everything I had practiced all at once at the very beginning of the song, what a rush of rogue noise that was! Ouch! Then they got smart and programmed it to clear the buffer every time the clock was started. It didn't take me long to learn to put a couple three or four blank bars at the beginning of every song so I could put in all the patch changes and system exclusive dumps before the music starts, and still have time to capture that first sustain pedal press.