When you sleep at night, your core body temperature falls a few degrees. It is not a huge change, but it is enough to be noticeable if you take your temp when you first wake in the morning if you can get four hours of solid sleep. Your room may be too hot or too cold, but did you know that your feet are the main indicators of temperature when you are trying to sleep? If your feet are cold, you are going to find that you cannot sleep. Once your feet are warm, that signals the rest of the body that it is safe to cool off and sleep. If you cannot sleep, try wearing socks to bed each night and see if your situation does not improve rather quickly.
Socks or no socks, you probably are going to find that you cannot sleep if the room itself is too warm. Some people can doze off in a warm room with no problems but others cannot. This may be why you are not sleeping. Try a fan or an air conditioner. You may feel cold, but put those socks on your feet and snuggle up under a blanket. You may find the combination of the cool air and the blanket and socks is enough to have you feeling drowsy within a half an hour if not sooner. The reason you cannot sleep may be something as simple as the room temp being too high.
Your mattress may also be the reason you cannot sleep. This is an obvious one, but your bed may not be as good for you as you think. Even those with expensive memory foam can have problems sleeping. Ideally, you should fall asleep in one position and not move all night. The most common problem is back pain. If you cannot sleep and have a sore back on many mornings, there are two things you can do. If you are lying on your back, put a small pillow under your knees. If you are on your side, put a thin pillow between your thighs. This keeps your spine in line. Sleeping on the stomach is not good for anyone with any back pain or problems.
You also have to think about all external factors when you find that you cannot sleep. Is there too much light in your room? Are sounds from a road keeping you awake? Do you worry too much and therefore cannot sleep? Are your kids waking you up a lot enough those they should be sleeping through the night? There are environmental changes that you can make, even if it means changing bedrooms, that can make a huge difference. Once you get some sleep, you'll be thankful for all of the changes you had to make, even if expensive ones. Sleep is priceless.