Current studies suggest that there is a link between inositol and depression. Inositol and serotonin have a very similar profile. If for some reason you have been living under a rock and never heard of serotonin, it a very common chemical in the brain that acts as a neurotransmitter (sends impulses to and from nerve endings in the brain). People who have depression often have a lack of serotonin in the brain or lacking serotonin activity. Proper function of neurotransmitters like serotonin require inositol.
So supplementing with inositol can benefit disorders like depression and panic attacks since it encourages proper transmitter functions. Disorders like O.C.D are believed to benefited by inositol for the same reason. Since one of the benefits that comes with this is a calming effect on the nervous system, insomniacs can benefit from the calming of the brain wave activity.
It is also important to note that caffeine intake is linked to depleting inositol. So if you think you might have a deficiency of inositol, too much coffee could be the culprit.