If you wake between 2 and 4am most nights and cannot get back down, the usual advice is melatonin. Melatonin helps you fall asleep. It does very little for staying asleep.
The usual suspects, roughly in order of how common they are: eating too little through the day and running a glucose dip overnight, alcohol in the evening, training late without enough carbohydrate afterwards, stimulants too late in the afternoon and genuine cortisol dysregulation, which is the least common of the four despite being the one the internet talks about most.
Which pattern fits you? Curious what the split looks like here.