The research - by the University of York in collaboration with the University of Pennsylvania - conducted on social media feeds also showed that this belief could lead to people changing their dosage depending on what they had or were about to eat.
The research was conducted in order to understand more about people's attitudes or beliefs towards statins which are prescribed as a means of reducing the risk of heart attacks and stroke.
Researchers focused on social media as a less intrusive way to find out more about people's attitudes to statins - rather than talking directly to patients about their behaviour and reasons.
The team read and analysed more than 11,000 posts from Twitter where a statin was mentioned over a period of five years. Of these, around half were related to associated health issues with 21 per cent discussing beliefs around taking statins and seven per cent talking about side effects. Many of the posts were identified as a statin user or as someone who knows a statin user, or a health professional.
Of the over 1,000 posts analysed which focused on beliefs around medication, 72 per cent of the opinions or beliefs referred to risk compensation behaviours in which patients engage in behaviours such as poor diet and physical inactivity perceiving themselves to be "protected" or at lower risk by virtue of taking preventative medications.
A further 11 per cent were in relation to the user's own behaviour such as the freedom to eat an unhealthy diet. One post read; "with Lipitor [type of statin] I eat as much bacon and cookies as I want" and others talked of increasing their dose of statins after unhealthy food.
Dr Su Golder, from the Department of Health Sciences, said: "We know that many people do not take their statins as they should or stop taking them , without being asked to by their doctor.
"Often in health surveys people when people are directly asked questions they will say what they think they "should" say and so this survey took a different approach by analysing publicly accessible sites where the subject of statins was being talked about freely."
"Some of the issues that came through were from people talking about their personal experiences particularly muscle pain as being a key reason for stopping statins. There were also discussions about dosage.
"Posts indicated polarised beliefs and attitudes to statins from saving lives to causing death. "
The researchers say that Twitter may potentially be utilized as a data source to find beliefs and attitudes that may impact on patient's decisions regarding their statin treatment. This may help inform research, and improve public health messages and communication between health professionals and patients.
Statins reduce the build-up of fatty plaques that lead to blockages in blood vessels, though reported side effects and the extent of how often they are prescribed has attracted controversy.
According to the British Heart Foundation statins are one of the most commonly prescribed drugs in the UK with around 7-8 million adults in the UK taking them.
The study was funded by the National Library of Medicine of the National Institutes of Health in the United States.
The paper is published in JAMA Network Open