First, definition of terms: cosmic consciousness is the awareness of the entire universe all at once. However, I have found that there are different levels of identification in this state. The goal is to have no identity whatsoever, since as we will discuss, it is illusory. However, due to habits of mind, some traces of identity may seep into this state and disrupt the perfection. Be mindful of that, because with each insight comes the possibility for stagnation due to the incredible apparent level of truth it brings, as explained here.
Now, before you can try to have the experience:
First, you must have a solid intellectual grasp of the nature of reality. You must understand that free will is a delusion. Why is it? Because everything happens perfectly according to natural laws, automatically. Nowhere can science nor logic find a place for autonomous agents which are able to act outside of the laws of physics, chemistry, biology, and so forth. Even if there is some metaphysical universe, it too would operate on laws. Without laws there is only chaos. Try to simply define what free will means--you will see that you can't define it in a way that makes sense.
So this human brain has evolved to imagine that it is somehow separate from reality and in control of reality to some extent, but just enough to frustrate itself almost constantly due to things not being as they "should" be.
In fact, of course, everything is always functioning perfectly according to natural laws. Just from this small perspective it seems otherwise. So the task is to be mindful of the automatically perfect nature of reality and let go of the habit of thinking in terms of "I", "me", "mine." These concepts are created by the brain/mind and do not exist outside of that context.
A good mantra is: "Perfectly automatic, automatically perfect." Repeat that in "your" head all day long and deeply penetrate it.
Now, if you continue to do that, you will eventually disappear entirely from the universe. Actually, that's not true, because you never were here to begin with except, again, as a concept. But this sensation of "you"ness will be gone. Just universe left. It may take time, but it happens automatically just like everything else. Do not worry about it. Just keep mindful of the nature of reality.
If you are not perfectly clear now that there is nobody here in this automatic display, STOP reading at this point and ask for free help from those who have wisdom over at LiberationUnleashed.com
Before I go on about the cosmic consciousness trick, let me give you this caveat: One problem with psychedelics and even cosmic consciousness is that the states produced are so far away from our everyday experience that it makes liberation seem something very difficult to achieve permanently. That is why Buddha tried to show people how to stop suffering right here, right now, in the midst of ordinary everyday life and perception. His advice to Bahiya is exemplary of that.
And now here's the trick to blast into cosmic consciousness:
The mind's habits are particularly easy to break in a dream state or inbetween waking and dreaming.
So, wake up around 3am (assuming you normally wake at 6am or 7am) and sit up comfortably while you meditate on your breath for a few hours. Just notice the automatic nature of the breath as it goes in the nose, thru the body, and then out the body and thru the nose. As thoughts arise, just come back to the breath, noticing that thoughts arose automatically also. Noticing that noticing happened automatically also.
After about 2 hours of this practice, you should feel completely serene. At peace. You will also be very tired probably. So now lay down and go to sleep with the intention of entering into a lucid dream to continue contemplation of the automatic nature of reality.
Now chances are extremely good that you will enter a lucid dream due to the meditative mind-state you were in at the time of going to sleep.
Once you are in the dream and realize you are dreaming, again focus on the automatic nature of reality. Try to see how every particle "in you" functions according to the same laws as everything "outside you." You should start to notice the border between "inside you" and "outside you" becoming impossible to distinguish.
Another approach is to follow Buddha's advice to the wanderer Bahiya, in which he said, basically, "Try to see direct experience: in the seen, there is no seer seeing, only the seen. When only the seen is seen, that is the end of stress." In other words, we are getting rid of "experience of reality" in favor of reality itself.
At this point the whole dream explodes into cosmic consciousness when there is no separation between you and the universe. It can be so massively blissful and awesome that you wake up fairly quickly. But if you keep practicing, you should become more used to it over time.
The worst mistake tho, is to start prancing around like me and saying "Ooh, look at how special I am, I have achieved cosmic consciousness! I'm a true yogi! Bow down to me! haha!"
So don't do that. You're nobody, and certainly nobody special. Just automatic like everything else. Remember that. :)
P.S. If you are interested in the Buddha dharma and you liked the linked blog entry on "Seven stages of awakening" by Thusness, then I suggest you join the facebook group Dharma Connection so you can talk to folks who are awakened to no-self. Obviously on any group there will be a bunch of nonsense, but this group does have some very worthwhile posters. The group's worthwhile posts are archived on this blog: http://dharmaconnectiongroup.blogspot.com/