Let's say, you've asked a rather localized question of little general interest, like an exercise from a book, or a step in some proof. After some time, you figure out the answer on your own. Which action is most in the spirit of this site: posting an answer containing a full proof, posting an answer or comment containing some hints or a sketch, posting a comment merely stating you have the answer, or even doing nothing at all?
I agree with Arturo. If you figured out the answer after you asked the question, you should answer it as if it was someone else who asked the question -- so also observing any requests you made originally (if you only asked for a hint...).
Please don't "do nothing at all". One of the reason that Q&A websites such as this one is useful is precisely that people can search through old questions and see what has been asked and what has been answered. So providing an answer to the question is definitely preferable to not doing so.
Just thought I would add that the site actually supports people answering their own questions in the form of the "Self-Learner" badge:
Self Learner: Answered your own question with at least 3 up votes