If they are smart and value their brain health, I have found that it sometimes helps to inform someone in a manic episode that prolonged mania (and especially full blown manic psychosis) leads to excitotoxicity and is actually acutely damaging to the brain.

I explain that mania often feels really good! It can feel like "everything is really important and meaningful" all of a sudden, and that "there is a greater truth that they see clearly now".
I ask if they think they are experiencing something like that?
I ask if they care about limiting potential long term damage to their brain.
I try to offer a selection of choices of ways to come down from mania safely: e.g. would you be ok doing a group call with a doctor to discuss ways to limit damage? would you be comfortable taking some seroquel/lithium/GABA-ergic drug with medical supervision? what about trying to get some sleep? etc. Steer clear of stimulants/weed/psychedelics, they usually make mania worse.

Another common effect of mania is tanked working memory, it's very hard to avoid thought loops or stay on a single train of thought for more than a few minutes. If you find discussions sliding backwards or repeating often, help them externalize their working memory on a whiteboard, paper, voice memos, etc. so they can actually think clearly. The relief they experience from lowering working memory load / not having to re-derive every train of thought Memento-style helps a ton to lower combativeness + re-ground them in reality. If you have any experience with high dose psychedelics you can sort of model mania as a similar mental state and "tripsit" them in similar ways.

Keep in mind that even though their working memory is tanked, long-term memory is not, they will likely remember everything you say and do with them, and might take deceit personally for a long time. Set boundaries, prioritize your own health and security, but try to avoid forcing them / lying to them too much, it can backfire and damage real long-term trust.

You have to balance maintaining their trust with the reality that they may try to trick you / forget their own promises. If they agree to be driven to the hospital, discreetly child lock the doors to stop them getting out on the highway if they change their mind. If they agree to try to sleep in their room, make sure they cant climb out a balcony window, etc. they can't be fully trusted to not endanger their own life in this state.

Good luck and thank you for caring enough to help them. Video or write about parts of the experience (privately) and share it with them afterwards, they may appreciate seeing an objective record of what their mania looks like to others, to calibrate against what it feels like internally. If another episode happens in the future, pulling up those notes/videos can help convince them to get help sooner as it can help remind that it's an "episode" that can't last forever.

Diclaimer: I am not a trained professional in this area / this is not medical advice, it's just based on my own experiences / YMMV

Also when in doubt, call 988 (if in the USA). You will be connected with a real person who can help you de-escalate the situation and connect you with non-police resources.