It is perfectly legal. Cybertron even won nationals with the ability to take notes. It is a very powerful tool when playing best of 3.
That's pretty interesting, I might try doing that at worlds, especially for things like counting the turns of tailwind/trick room/weather
Even more so is to note the moves and items the opponent is using. In best of 3 knowing what moves they have will make prediction much easier.
Also taking notes on speed vs your own pokemon will be helpful.