I think your imagination begins to fade into the background when you start to make compromises in order to fit in with friends, which is about the age you stated, around age 7 or 8. This is around the time that a girl usually arises in the class social structure, and you begin to do things in order to be “in” with the in group. The energy that was was channelled into creativity gets focused into either fitting in, or following directions on how to be creative in order to meet a standard for a grade (example: Did all the spelling words really have to have one sentence each? What if you could think of a single sentence that used 5 spelling words? Why would that be wrong?) With boys, creativity stays a little later, and starts dropping off around age 11 for the same reasons—assimilation.
@Fiddle_Playing_Creole_Bastard‘s suggestion is a good one. Reading lots of different sorts of material does pique your creative ability. And, oddly enough, the not sleeping, while not advisable for other reasons, is correct because being that tired lets down your guard. When tired, your control over your self-awareness drops, and you really don’t care what others think of you.
Creativity comes when you use it. Sometimes it comes when you’re really bored and the only way to break the boredom is to amuse yourself. Try going without TV or cell phone over the holidays. Find something intriguing, like a painting or a craft, or a style of writing, and see if you can replicate it. Sit in a public space and people-watch. Find a person that looks interesting, and write a description of them, and then go home and write a story about that person. Describe the secret life of your pets when you’re not home.
If your school or community has an improv program, join it. Creativity can be catching.