You need to undergo polysomnyography (PSG) to
rule out sleep disorder, EEG to
rule out any epileptic foci, and also psychiatric evaluation which will help to rule out any factor.
I suggest you to sleep with lights on, good sleep hygiene, long acting sedatives against prescription will help you maintain sleep, keep away from any triggering factor (smell, food etc. need to be identified.