Hi Ant101

Setting intentions has never really kept me awake but I have had this problem when doing a mantra before going back to sleep (I suppose they’re technically the same thing) Here’s what I find helps.

1. Relax before doing anything. Breathing meditation whilst laying down works for me and gets me into a nice relaxed sleepy state. Then when I feel I could just roll over and fall sleep I begin intentions/ mantras.

2. When I’m doing the mantra I keep it simple and easy to remember and try doing it in time with my breaths in and out. This keeps a rhythm going and I can do it whilst falling asleep usually.

The idea is not to focus too intently on it. If it’s keeping you up stop as sleep is the most important goal and the intention is most likely set after saying it in your head a few times anyway. I find daydreaming and visualisation helps me drift off after doing mantras/ intentions if they’re keeping me up.
When setting intentions I usually just say what I want to do a few times and form a plan. Talk it through in your head what you want to do and how you’ll do it and visualise it as you’re thinking about it. If you have a plan ready before sleep then it will solidify better in your mind and you can refer to it easier when you do become lucid. That’s if you can remember it when the time comes! I’m also going through this plan at moments throughout the day as well to help me remember it and prepare for when the time comes.