To get a good nights sleep you have to feel comfortable and safe. Think through what you need to feel safe in your bed in the bedroom?
Your bed needs to be comfortable, invest in a bed that suits you. Some people say invest in good shoes and a good bed!
If thoughts and worries go through your head preventing you sleeping you may find it helpful to keep a pen and paper next to your bed. Write down the tasks/ worries/ thoughts then your head may be clear and you can sleep.
Keep your bedroom free of clutter and electrical equipment. Do not work in your bedroom. Your bedroom is for relaxing, sex and sleeping only.
Do not worry about not being able to sleep, if you stay in bed you are resting. Try to do some relaxation exercises and stay in bed. If you do feel you need to get up make a camomile tea and do something relaxing like reading. Then go back to bed to rest.