Do all ppis have insomnia as a side effect? Taking Prilosec for gastritis; it caused insomnia even though taking lunesta (eszopiclone) for primary insomnia. Thanks.

Unlikely. Just about any medication could theoretically affect your sleep however often the side effects listed for drugs come from things patients report during clinical trials which may or may not be from the drug. Personally i don't believe ppis cause insomnia and there may be something else at play with your sleep.