Just write it.
There are plenty of things that you can learn about yourself through questioning the things that lead you to become motivated. Motivation toward things that require effort or for things that require exertion can be difficult to understand until you search for the answers within yourself.
Motivation is deeply personal. It may also be affected by your reasoning, your mood and feelings and even the time of day, season of the year and even your stage of life.
For myself, I have learned that to become motivated towards things requiring physical training, I need to have a logical and realistic reason in mind.
I also have learned that I do better at training in the morning after a night of rest to recharge. I have found that Spring and Summer are much more motivating for me due to the growing lengths of each day and the sunshine that gives me energy.
The various stages of my life have also affected my motivation. Being single made it easier to prioritize exercise when compared to being the father of small children who required my care and attention.
Some of none of these things may apply to you, but the point I am making is that you need to think these things through in your mind and then to make it more easy to remember, I suggest writing these things down in a journal.