Hiking in Yosemite National Park is an amazing way to get exercise while enjoying nature without even realizing how much exercise you are getting. Unfortunately Yosemite is a couple hours (round trip) drive from Fresno so it can be tough to get all your exercise in during a single day. Another challenge is that the last part of the drive to Yosemite from Fresno is very twisty roads so you may want to avoid any night time driving.
There are some great and relatively inexpensive motels and inns just outside of the park around Oakhurst. The advantage of these is that the prices are typically less per night that the hotels and motels inside Yosemite. The disadvantage is that you waste time driving outside the park, may miss out on some of the night time events inside the park, and may spend more for multiple park entrance/exits.
In lieu of adding these extra complications to your trip consider staying inside the park. If budget is not a consideration there is The Ahwahnee which offers an amazing world class elegant environmental with a gourmet dining area and to die for scenery. Less expensive is the Wawona which is still quite expensive. It is designed almost like a plantation mansion with whitewashed walls. If you stay here make sure to bring your cell phone as many if not all the rooms have no telephones. Additionally this may not be advisable for traveling with children because many if not all the rooms have no televisions. A bit less expensive is Yosemite Lodge which would remind you of a Best Western set in the forest.
The best option for the budget traveler is the campsites. If you already have camp gear pick one of the basic camp sites which are usually less than $50 a night depending on the night. If you do not have camping gear, or don't want to bring it there is the Housekeeping Camp, Tuolumne Meadows Lodge, and White Wolf Lodge which offer canvas tent cabins and hard sided cabins for about $60-$80 a night depending on amenities. These are near hiking trails and some sites include campfire ring. Additionally you can purchase packages that include the camp, bed rolls or beds or cots, and everything you need to make Smores for about $90 for a family of four.
If you want an extreme hiking opportunity you can do the High Sierra Camp. The camp is located in the back county and allow you to hike deep into the forest without the weight of tents and cooking gear. Accommodations include your lodging, and breakfast and dinner. They are typically offered on a lottery basis due to high demand but you can always check the website for last minute availability. If you are a bit flexible on while of the many high sierra camp sites you stay at you can usually find last minute camp sites for almost any day. The camp site that I found most available for last minute and booking is the Merced Lake one. This camp is a 14 mile hike from the nearest parking area, near hiking trails, near lakes for fishing, and includes dormitory style lodging with both breakfast and dinner provided in a dormitory style cafeteria tent. The price of this site from experience is around $110 a night. If you are flexible with dates you can often find last minute availability at Glen Aulin, May Lake, Sunrise, and Vogelsang sites.