Jonathan Edwards offers his explanation. (See below for my attempt at restating him.)
That we should say, that God has decreed every action of men, yea, every action that they do that is sinful, and every circumstance of those actions . . . and yet that God does not decree the actions that are sinful as sinful, but decrees [them] as good, is really consistent.
We do not mean by decreeing an action as sinful, the same as decreeing an action so that it shall be sinful; but by decreeing an action as sinful, I mean decreeing [it] for the sake of the sinfulness of the action. God decrees that it shall be sinful for the sake of the good that he causes to arise from the sinfulness thereof, whereas man decrees it for the sake of the evil that is in it. (Miscellanies #85, paragraphing added)
In other words, God can decree an action that is sinful for a human to perform, because he decrees it for non-sinful reasons.
A sin is only sinful because of the attitude of the heart in doing it. When humans sin, we are by definition rebelling against God. But in ordaining human sin, God doesn't rebel against himself. Rather, he ordains our sins with good ends in mind, which makes the act of ordaining them not sinful, since the attitude of his heart is not rebellious but righteous.
Some biblical expressions that seem to support this understading are Genesis 50:20 and Romans 11:32.