The COVID-19 outbreak has so far caused millions of cases and deaths globally. Human behaviour has been identified as the key factor in the spread of the SARS-CoV-2 virus and there is considerable interest in understanding the relationship between the way people act in response to the infection risk and the disease progress. Mathematical modelling has been at the centre of policy-making aimed at the prediction and control of the virus, using a wide range of approaches. We introduce a network model incorporating disease spread and individual decision making in response to disease risk. Disease spread is controlled by allowing susceptible individuals to temporarily reduce their social contacts in response to the presence of infection within their local neighbourhood. A cost is ascribed to the loss of social contacts, and weigh this against the benefit gained by reducing the impact of the epidemic. Depending on the characteristics of the epidemic and on the relative social importance of contacts versus avoiding infection, the optimal control is one of two extremes: either to adopt a highly cautious control, thereby suppressing the epidemic quickly by drastically reducing contacts as soon as the disease is detected; or else to forego control and allow the epidemic to run its course. The worst outcome arises when control is attempted but not cautiously enough to cause the epidemic to be suppressed. The model has been tested in experiments predating the COVID-19 outbreak when the observed response was too weak to halt epidemics quickly, resulting in a reduced attack rate but the longer duration and fewer social contacts, compared to no response. A comparison with the current pandemic shows the prevalence of repeated cycles of outbreaks caused by relaxation of response.