I have been very sick with a fever for four days. I have been in bed for four days. Is bed rest okay when you are sick? When should I get out of bed?

Ok. Bed rest is fine. You should listen to your body and let your energy level dictate your activity. If you continue to have fever though i would see your doctor and make sure you don't have an underlying bacterial infection.
Bed rest. Try to sit up on chair, lay down on a couch, rest in bed , alternate when awake. Too much bed rest may cause back pain, weakens muscles, even cause constipation, or confusion. This is more significant on very i'll-elderly patient. Rest as you deemed necessary, no strict rules.