I put "May you sleep here?" and it was marked incorrect.
I know it sounds strange a bit since "may" conveys one must give the person permission to perform such a task, but if you're a kid and want your friend to stay the night, but they have to ask their mom . . . I don't think its that outrageous.
It's technically permissible but not very common. "Are you allowed to..." or "Can you..." would be far more common and less ambiguous. "May you..." can also have a meaning of asking about the possibility.
In English that is exactly the difference between may and can, may denotes whether or not something is permissible and can means whether or not it is possible.
Can you do this? = Are you able to do this. May you do this? = Is it permitted to do this.
Is this "du" literally the person I'm talking to, or just a unspecified person like "Mann"?
From a Wikipedia article on the English "generic you": "In German, the informal second-person singular personal pronoun du (you) is sometimes used in the same sense as the indefinite pronoun man (one)."
However, I think this usage is much less common in German than it is in English. When you read/hear German, you'll encounter the indefinite pronoun "man" quite frequently. However, note that the indefinite pronoun is "man" (lower case 'm' and only one 'n') rather than "Mann" which is the noun for an adult male.
If this was really proper German, I believe this should actually be "Darf man hier schlafen?" I've just realized this is lacking throughout the German program. In formal German, these kinds of questions are always framed in the third person.