You can get a humidistat for an attic fan at any electrical supply house and also at many home stores. But I suggest that you don't use it!
I had one on my attic fan and it did not work well for me. Here is the problem. If it is humid outside then your fan may come on and stay on. If it is very dry outside then it may not turn on even though vapor is condensing in your cold attic. The humidity does not have to be very high for warm slightly moist air to condense on your cold roof. What you really need is a differential humidistat that only turns on when the humidity in your attic is higher (say by 10%) than the humidity of the outside air.
The differential humidistat was too expensive a solution, so I wired a timer in parallel with the thermostat that turns on the attic fan several times a day and night for five minutes at a time. I turn off the timer during the summer.
It's not an elegant solution but it does the trick. If I had a ridge vent and soffit vents, then I would not need all this electro-mechanical stuff. My house has a slate roof and no eaves, so my ventilation choices are limited.
Also, you should make certain that you use bathroom ventilation fans that exhaust to the outside.