They commanded me to sleep.
Good!
I commanded you. Subj.+verb+Obj.
The structure of your sentence is right but it is not complete. You should add the object complement. Think about the question: What did I command you to do?
I commanded you to clean the room. Subj.+verb+Obj.+object complement