To begin with, yes, you can cast it on yourself.
The target line is "one humanoid," with no further restrictions in the text of the spell. If you are a humanoid, legally, you can Dominate yourself.
What happens next is ambiguous.
The spell is ambiguous on several key points:
It is clear that the target entering the Dominated state and receiving its first order are part of the same action. But what happens first? Does the subject "become dominated" and then "receive its first order," or the other way around?
Can the target still think in ways that don't require an action? Or are they in a completely will-less state?
The argument for permitting it goes like this:
You cast Dominate Person on yourself, with a command something like "act the way you want to." You are now dominated, and single-mindedly performing the task of... Acting exactly like you're not dominated.
The key point in favor of this is that there is no complexity limit on commands:
If you and the subject have a common language, you can generally force the subject to perform as you desire, within the limits of its abilities.
Doing whatever you want is certainly within your abilities, therefore you profit.
It's a little cheesy, but the "be yourself" loophole isn't without precedent in genre fiction.
Argument for not permitting it (kill it with fire):
You cast dominate on yourself. You enter a dominated state, and wait for orders. Unfortunately, you no longer have the will to order yourself around, so you wait in a will-less state ("to the exclusion of all other activities except those necessary for day-to-day survival (such as sleeping, eating, and so forth).") for the duration of the spell.
Argument for not permitting it (except at a cost):
You cast dominate on yourself, and give yourself a command (but not "be yourself," because what does that even mean?). You then enter the will-less state of domination, and are unable to change the command once given.
I. Wishful Legalism
The "Act as you want" command can backfire terribly - think about all the occasions in which a responsible, non-psychotic adult shouldn't do or say the things he happens to want at the moment - postponing gratification, acting tactfully and respecting social bounds all goes against doing what you really want... An attentive DM could make wonders with a PC in a fugue state for a few days, acting "as he wants". Different wording can backfire just as well, for example: "do what you should be doing" can cause the dominated PC to immediately cast Dominate Person on herself again! :)
And then, when the DM narrates some psychotic action you look him dead in the eye and say "I don't want to do that." At that point the DM is either violating the rules of the spell, or dictating what your character does/does not want. Either is bad.
Remember: Unlike with alcohol, you still have your full capability to predict the outcome of your actions, and use that to determine what you actually want.
But suppose your DM does say they'll permit this type of action, and then tries to weasel out of it by twisting your intent. In this case they might get you once or twice, but they have started a war they can't win. The command can be arbitrarily long, so you simply have to sit down, write something that you feel is ironclad, and keep iterating until the DM fails to screw you (you may want to do this in a secure location during downtime).
For example, the next step in the escalation would be something like this: "act as though you hadn't been dominated, except don't dominate yourself again (for the same purpose as the casting of this dominate)."
A smart DM will just flat out say "no" and pick one of the other interpretations (or declare it a house rule).
II. Saving Throws
Dominate Person allows its targets a number of saving throws. Do you need to worry about rolling too high, and accidentally breaking your own Dominate?
As it turns out, the answer is "no." You are always allowed to voluntarily forfeit a saving throw:
Voluntarily Giving up a Saving Throw
A creature can voluntarily forgo a saving throw and willingly accept a spell's result. Even a character with a special resistance to magic can suppress this quality.