Phenibut is unpredictable and unreliable. There are no established doses or schedules of taking it, only urban myths and legends. It's one of those things that everyone tries and nobody stays on it for the unpredictable lack of effectiveness.
There are actual safe and effective drugs for sleep - zolpidem (Ambien). For libido, there are no established drugs at all, because it is such a complex neurochemical process depending on gazillion factors. You could try "tonic" type herbs like red ginseng but they may exacerbate irritability/anxiety.