I have experienced this issue (fan randomly coming on in the night) and believe I have found both the cause and the solution and would like to share it with you.
Firstly this is to do with an inline fan system where the fan draws air out of a shower light assembly and then pushes it out...
These Official Forum Sponsors May Provide Discounts to Regular Forum Members - If you would like to sponsor us then CLICK HERE and post a thread with who you are, and we'll send you some stats etc