Hi there,
The trick with meditation is that you fully allow your body and your thoughts to do as they wish without judgement, and without ‘following’ the thought.
I did the same – I initially started meditation to help me sleep and to relax etc, but I realised along the journey that that’s not really what meditation is for, it’s actually a way for you to accept your thoughts, whether they are positive, negative, intrusive, conscious or subconscious (auromatic). In your case you’re having an intrusive and negative thought ‘I won’t sleep after this’. The problem here isn’t the thought itself, a thought isn’t reality. It’s just a thought that would come and go on its own if you let it be. You don’t need to analyse the thought, believe it, follow it or interperate it as negative, its just a thought. Once you truly accept you have no control over them, you begin to relax and your mind let’s it go. Think of all thoughts as traffic in a traffic jam, if you’re involved with a traffic jam it is frustrating and upsetting at times, but if you simply observe it from a bridge for example, it’s actually quite soothing and not a problem because you aren’t identifying yourself with the traffic jam. Or like clouds in the sky that show up in various shapes, sizes, and produce nice or awful weather, just let it pass. Your goal should not be to rid yourself of thoughts, it’s quite the opposite, welcome them and you begin to break the chain of negativity and automatic negative reaction. Please note, this takes a lot of time and practice.