It is possible to upvote one's own solution

It is allowed to upvote one’s own solution.
See for example my solution for: https://www.codingame.com/ide/puzzle/the-optimal-urinal-problem

Should not it be restricted?

You get EXP bonus when someone else credits your solution, and your solution’s score is higher so people who are scrolling through them have a higher chance of looking at it. You only change the score by 1 when you upvote it yourself.

I sometimes downvote my own solutions that I felt were bad so I don’t think it really matters.