Most ridiculous sleep problems. Early morning waking/ is melatonin still made?

Sleep maintance .... Need more details but looks like..Sleep maintance difficulty so keep same sleep wake cycle, avoid caffeine in afternoon and any day time naps. Sleep restriction therapy and not to sleep in bed or stay in bed , if cannot fall/stay a sleep >15 min. Look for any medication side effect if on. Melatonin at bed time can be tried. Exercise regularly and if constipated take supplements for regular bm.