It is very difficult to track the origin and motivations of very recent expressions, due to the information going spread faster and faster. In this case, the expression is not present in the CORDE, but it is in the CREA. The first use appears in a 1981 book, "Días de guardar", from Spanish writer Carlos Pérez Merinero. Examples:
"Henri era un cliente asiduo de "Le Pelican" y solíamos jugar al juego del camarero y el cliente indeciso con destreza de maestros. Sólo que entonces tenía yo el papel del cuchillero y él el de la víctima propiciatoria. Nos lo pasábamos teta."
"El cabrón del maître observa la jugada y se lo está pasando teta. A lo mejor el muy hijoputa, al ver mi pasividad, me toma por un mariposón."
The Spanish language has a variety of expressions with the same structure to note that someone is having a good time. Every one of them uses a positive word (in some sense or another), related to entertainment:
- Pasarlo bien.
- Pasarlo de fábula.
- Pasarlo pipa. Maybe related to eating sunflower seeds, or to enjoying some pipe tobacco, or even related to sex, given that "pipa" may refer to the clitoris.
- Pasarlo en grande.
- Pasarlo bomba. Maybe related to the fact that "¡bomba!" was an expression used decades ago before someone made a toast (see 22nd meaning in the definition).
Most of these expressions have been recently included in the DRAE. Some of them are from the 2001 version, others from the 1992 version. So if you think about it, using "teta" is just a normal evolution, an expression that just nobody knows its origin but fell in grace among the people, because it represents both the child being breastfeeded (related to entertainment and joy) and the adult, more sexual theme of playing with a woman's breasts. But that may place the expression a bit on the machismo side, the same case as something cojonudo being something good, and a coñazo being something bad, only on a lighter level. But this sexual theme regarding the origin of the expression does not mean that you have to use it in sexual contexts, as seen in the examples above, so I am more inclined to think that the expression may have its origins in the entertainment and joy of breastfeeding, as you propose in the question.