How do you mean sin?
What do you mean sin in your dreams? If you are referring to like say, wet dreams from dreaming of having sex or something along these lines then:
A person that is slow will only be accountable for what they are able. Someone who is retarded may know some things right from wrong but some things they do not realize or because of there mentality think of things that usually are not suppose to be thought of in the form of say lust. I will be accountable I believe for more than someone of a slow state. Just as a baby is accountable for nothing, for God knows. God searches the heart. If you had a dream that came in your head that is your subconsious mind thinking and therefore you really have no control over it.
Romans 8:27
And he that searcheth the hearts knoweth what is the mind of the Spirit, because he maketh intercession for the saints according to the will of God.