That pillow or mattress that's too firm or soft is not the cause of your restless night of sleeping. Turns out family relationships may be affecting how you sleep.

A restless night of sleep may be because of stress and worrying about family. A fight with a family member or a demanding family could lead to a person thinking about them before bed, stressing out and ultimately not having a good night of sleep.

The sleep study was led by Jennifer Ailshire, PhD, from the University of Southern California and Sarah A. Burgard, PhD, MD, from the University of Michigan. The researchers used the National Survey of Midlife Development in the United States to determine what role social situations or family played on sleep habits.

Who you are in contact with during the day plays a big part in how well you may sleep. The survey included self-reports of sleep problems, how much you contact your family outside of the house, social support from family as well as any negative family relationships.

The researchers discovered that daily or weekly sleep problems were more common in people who had a lot of contact with their family and in particular, individuals who had difficult family relationships.

The stress of a problematic family relationship can cause stress and if someone is thinking about that fight they had with their brother, mother, father, sister or adult children that can lead to a troubled night of sleep. Additionally, not getting the emotional support you need from your family could also affect your sleeping patterns.

The research builds off of previous observations about sleep patterns being affected by family and individual lives with. According to Corinne Reczek, PhD, from the University of Cincinnati, spousal relationships and young children mold sleep patterns in the individual because of the needs and demands of these relationships.

The relationship with your extended family may be affecting you more than you realize if you are having trouble sleeping. A good night of sleep not only affects your mood but there are numerous health benefits from healthy sleeping patterns. Recent studies have suggested that lack of sleep could increase the risk of diabetes and obesity.

For some, sleep problems are just another reason to try and avoid family contact. For the nearly 50 million Americans who have difficulty sleeping, understanding how your family may affect your sleep could help reduce stress before bed and can be an alternative to sleep aids.

The study was published in the Journal of Health and Social Behavior.