There are two different grammatical structures in English that both use "going".
The first structure is a future tense that is formed by a conjugated form of "to be" (For example "I am" or "you are") followed by the word "going" followed by the infinitive of a verb (for example "to run" or "to eat"). An example of this tense would be "I am going to run". If you use "to sleep" as the verb in the infinitive in this construction then you get exactly your sentence: "I am gong to sleep". In this case, "to sleep" is a verb and the sentence implies some future action. You would often see this kind of sentence with a time and/or location phrase (for example: "I am going to sleep at my friend's house tomorrow").
The second structure is the present continuous tense which is formed by a conjugated form of "to be" (For example "I am" or "you are") followed by the present participle of a verb which is the form that ends in "-ing" (for example "running" or "eating"). An example, of this tense would be "I am eating". Since "to go" is a verb you can use its present participle ("going") in this kind of sentence as well to get "I am going". This tense implies an action that has already stared and is still happening ("I am eating", for example means that I have already started eating and I am still busy doing so). It's possible to use an object with this kind of construction, and the object can be either a direct object ("I am eating my dinner") or an indirect object introduced by a preposition ("I am going to the supermarket"). Note that in the case of a sentence like "I am going to the supermarket", the word "to" is not a part of the infinitive of a verb; it's a preposition. If you substitute "sleep" for "the supermarket" in this sentence you get exactly your sentence "I am going to sleep" which, in this case (since it's a present continuous tense) would mean "I am currently busy falling asleep).