It’s easy to write your own affirmation, you simply need to decide on what you want to achieve.
Affirmations are written in the present tense, as though your goal is already being achieved.
So instead of saying “I will try to get seven hours of sleep tonight”, you would say “I get seven hours of sleep every night”.
Use positive language and keep them short, less than five or six words so they’re easy to recall.