There are several ways to record tempo changes in real time or to createa tempolist to fit the music into a grid after the fact of playing the music into a software.
Make a Tempo Track in advance:
Tempo changes are controlled by tempo events, which are stored in a special tempo track. This track is not visible in the Arrange window. The tempo track applies to the whole song. The tempo track also determines the relationship between incoming time code, and the current song position.
Recording Tempo Changes during record by hitting ΒΌ notes on a pedal which is routed to tempo recording. The tempo is constantly adjusted to the time interval between two strokes
Activate the Allow Tempo Change Recording. All tempo alterations which you make during recording will now be recorded as tempo events on the tempo track. You can then edit them in one of the tempo editors.
Adjusting the Tempo to Fit Regions
This I use when I have pre-recorded material. I cut the material into measures and apply "Adjust Tempo by Tempo and Locators"